Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ jobs:
rid: osx-arm64
runs-on: ${{ matrix.os }}
steps:
# GitVersion counts commits since the last tag, so a shallow clone gives it nothing to count.
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x

- run: dotnet build Stampeded.slnx -c Release
- run: dotnet tool restore

- name: Run GitVersion
run: dotnet tool run dotnet-gitversion /output buildserver /nofetch

- run: dotnet build Stampeded.slnx -c Release -p:Version=${{ env.GitVersion_SemVer }}
- run: dotnet test --solution Stampeded.slnx -c Release --no-build --report-trx --results-directory test-results

- uses: actions/upload-artifact@v7
Expand All @@ -53,13 +61,13 @@ jobs:
- name: Zip (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: Compress-Archive -Path publish/win-x64/* -DestinationPath Stampeded-win-x64.zip
run: Compress-Archive -Path publish/win-x64/* -DestinationPath Stampeded-${{ env.GitVersion_SemVer }}-win-x64.zip

# Info-ZIP keeps the execute bit; Compress-Archive and upload-artifact drop it.
- name: Zip (Linux)
if: runner.os == 'Linux'
shell: bash
run: cd publish/linux-x64 && zip -r -q ../../Stampeded-linux-x64.zip .
run: cd publish/linux-x64 && zip -r -q ../../Stampeded-${{ env.GitVersion_SemVer }}-linux-x64.zip .

# Unsigned and unnotarized: first launch needs `xattr -dr com.apple.quarantine Stampeded.app`.
- name: dmg (macOS)
Expand All @@ -69,11 +77,11 @@ jobs:
mkdir dmg
cp -R publish/osx-arm64/Stampeded.app dmg/
ln -s /Applications dmg/Applications
hdiutil create -volname Stampeded -srcfolder dmg -ov -format UDZO Stampeded-macos-arm64.dmg
hdiutil create -volname Stampeded -srcfolder dmg -ov -format UDZO Stampeded-${{ env.GitVersion_SemVer }}-macos-arm64.dmg

- uses: actions/upload-artifact@v7
with:
name: Stampeded-${{ matrix.rid }}
name: Stampeded-${{ env.GitVersion_SemVer }}-${{ matrix.rid }}
path: |
Stampeded-*.zip
Stampeded-*.dmg
Expand Down
13 changes: 13 additions & 0 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"gitversion.tool": {
"version": "6.8.2",
"commands": [
"dotnet-gitversion"
],
"rollForward": false
}
}
}
Loading