Debug CI #3
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
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 |