-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1ce22a
commit 42b8d19
Showing
11 changed files
with
162 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
# Maintain dependencies for nuget | ||
- package-ecosystem: "nuget" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: build | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
strategy: | ||
matrix: | ||
arch: [x64, arm64] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup MSBuild.exe | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Restore the application | ||
run: msbuild /p:Configuration=Release /p:Platform=${{ matrix.arch }} /t:restore | ||
|
||
# - name: Generate string files | ||
# run: | | ||
# $NugetPackage = nuget locals global-packages -list | ||
# $NugetPackage = $NugetPackage.SubString(17) | ||
# $ToolVersions = (Get-ChildItem (Join-Path $NugetPackage 'Opportunity.ResourceGenerator') | Sort-Object Name -Descending)[0] | ||
# $ToolPath = Join-Path $ToolVersions.FullName '/tools/Opportunity.ResourceGenerator.Generator.exe' | ||
# &$ToolPath "./ExViewer.sln" | ||
|
||
# - name: Generate env files | ||
# run: | | ||
# @" | ||
# namespace ExViewer { class Github { | ||
# public const string BRANCH = "${{ github.ref_name }}"; | ||
# public const string COMMIT = "${{ github.sha }}"; | ||
# } } | ||
# "@ > ./ExViewer/Github.cs | ||
# Get-Content ./ExViewer/Github.cs | ||
|
||
- name: Prepare certificate | ||
run: | | ||
$certKey = "${{ secrets.CERT_PASS }}" | ||
if ($certKey) { | ||
$certFile = Get-Item "./E-Viewer/E-Viewer-Key.pfx" | ||
$certPass = ConvertTo-SecureString -AsPlainText $certKey -Force | ||
Write-Output "Using exist certificate" | ||
Import-PfxCertificate $certFile -Password $certPass -CertStoreLocation Cert:\CurrentUser\My\ | ||
} else { | ||
$cert = New-SelfSignedCertificate -Type CodeSigningCert -Subject "CN=Opportunity" -CertStoreLocation Cert:\CurrentUser\My\ | ||
((Get-Content -Raw "./E-Viewer/E-Viewer.csproj") -replace 'AC82A857467374ACB64C3F8A542446485164DD50',$cert.Thumbprint) | Set-Content "./E-Viewer/E-Viewer.csproj" | ||
Write-Output "Using new certificate" | ||
Write-Output $cert | ||
} | ||
- name: Build the application | ||
run: msbuild /p:Configuration=Release /p:Platform=${{ matrix.arch }} /p:GenerateAppxPackageOnBuild=true | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Packages | ||
path: E-Viewer/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: check | ||
|
||
on: | ||
push: | ||
branches: ["*"] | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: ["*"] | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
|
||
publish: | ||
needs: build | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Packages | ||
path: ./ | ||
- name: Upload symbols | ||
env: | ||
MOBILE_CENTER_CURRENT_APP: Opportunity/E-Viewer | ||
APPCENTER_ACCESS_TOKEN: ${{ secrets.APPCENTER_ACCESS_TOKEN }} | ||
run: | | ||
npm install -g appcenter-cli | ||
Get-ChildItem */*.msixsym | ForEach-Object { | ||
Write-Output "Uploading $($_.Name)" | ||
appcenter crashes upload-symbols --disable-telemetry --appxsym "$_" | ||
} | ||
- name: Publish to github release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
draft: true | ||
omitDraftDuringUpdate: true | ||
allowUpdates: true | ||
artifacts: "*/*.msix,*/*.cer,*/*.msixsym" | ||
replacesArtifacts: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
# Build results | ||
bin/ | ||
obj/ | ||
out/ | ||
|
||
# Visual Studio cache/options directory | ||
.vs/ | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.