-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
Showing
7 changed files
with
140 additions
and
437 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,28 @@ | ||
name: Configure manifest | ||
inputs: | ||
manifest: | ||
required: true | ||
publisher: | ||
required: true | ||
version: | ||
required: true | ||
prefix: | ||
required: true | ||
branch: | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Configure manifest | ||
shell: powershell | ||
run: | | ||
$manifestPath = ${{ inputs.manifest }} | ||
$manifest = [xml](Get-Content $manifestPath) | ||
$manifest.Package.Identity.Publisher = "${{ inputs.publisher }}" | ||
$manifest.Package.Identity.Version = "${{ inputs.version }}" | ||
$manifest.Package.Properties.DisplayName = "${{ inputs.prefix }}" | ||
if ("${{ inputs.branch }}" -ne "master") { | ||
$manifest.Package.Properties.DisplayName = $manifest.Package.Properties.DisplayName + " (${{ inputs.branch }})" | ||
} | ||
$manifest.Save($manifestPath) |
File renamed without changes.
File renamed without changes.
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,72 @@ | ||
name: Base | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
- rafael/* | ||
paths-ignore: | ||
- '**/*.md' | ||
- '.github/ISSUE_TEMPLATE/*' | ||
- '.github/workflows/sponsors.yml' | ||
- '.github/workflows/translators.yml' | ||
- 'Graphics/*' | ||
pull_request: | ||
branches: | ||
- dev | ||
paths-ignore: | ||
- '**/*.md' | ||
- crowdin.yml | ||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
|
||
jobs: | ||
base: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Fetch all history for all tags and branches | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
includePrerelease: false | ||
|
||
- name: Use GitVersion | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
|
||
- name: Create artifacts folder | ||
shell: pwsh | ||
run: | | ||
New-Item -ItemType Directory -Force -Path .artifacts/ | ||
- name: Generate versioning artifact | ||
shell: pwsh | ||
run: | | ||
"${{ steps.gitversion.outputs.majorMinorPatch }}.${{ steps.gitversion.outputs.commitsSinceVersionSource }}" | | ||
Out-File .artifacts/version.txt | ||
- name: Restore packages | ||
run: dotnet restore EarTrumpet.sln | ||
shell: cmd | ||
|
||
- name: Build EarTrumpet | ||
shell: cmd | ||
run: | | ||
dotnet publish /p:PublishProfile=Properties\PublishProfiles\x86.pubxml EarTrumpet/EarTrumpet.csproj /p:Platform=x86 /p:OutputPath=..\.artifacts\base\x86 | ||
dotnet publish /p:PublishProfile=Properties\PublishProfiles\x64.pubxml EarTrumpet/EarTrumpet.csproj /p:Platform=x64 /p:OutputPath=..\.artifacts\base\x64 | ||
dotnet publish /p:PublishProfile=Properties\PublishProfiles\arm64.pubxml EarTrumpet/EarTrumpet.csproj /p:Platform=ARM64 /p:OutputPath=..\.artifacts\base\arm64 | ||
- name: Add to cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
key: base-${{ github.sha }} | ||
path: | | ||
.artifacts |
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,40 @@ | ||
on: | ||
workflow_run: | ||
workflows: ["Base"] | ||
types: | ||
- completed | ||
|
||
env: | ||
channel: "AppInstaller" | ||
publisher: "CN=File-New-Project, O=File-New-Project, L=Purcellville, S=Virginia, C=US" | ||
|
||
jobs: | ||
appinstaller: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Restore base | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: .artifacts | ||
key: base-${{ github.sha }} | ||
|
||
- name: Set Bugsnag API Key | ||
shell: pwsh | ||
run: | | ||
Get-ChildItem .artifacts\base\**\app.config | ForEach-Object { | ||
$cfg = Get-Content $_ | ||
$cfg | ForEach-Object { $_.Replace("{bugsnag.apikey}", "${{ secrets.bugsnag_api_key }}") } | Set-Content $_ | ||
} | ||
- name: Configure manifest | ||
uses: .github/actions/package/manifest.yml | ||
with: | ||
manifest: packaging/package.appxmanifest | ||
publisher: ${{ env.publisher }} | ||
branch: ${{ github.ref_name }} | ||
prefix: "EarTrumpet" | ||
version: .artifacts/version.txt |
Oops, something went wrong.