windows paths #15
Workflow file for this run
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: dotnet-release | |
on: | |
push: | |
tags: | |
- v** | |
env: | |
dotnet-version: '8.0.x' | |
jobs: | |
windows-x64-release: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.dotnet-version }} | |
- name: Install project dependencies | |
run: dotnet restore | |
- run: mkdir \app | |
- name: Compile exectuable | |
run: dotnet publish -r windows-x64 -c Release -o \app\ CloseAsteroids.csproj | |
- name: Zip executable | |
shell: Powershell | |
run: Compress-Archive -Path app\* -Destination windows-x64.zip | |
- name: Upload windows zip artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-x64 | |
path: windows-x64.zip | |
macos-x64-release: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.dotnet-version }} | |
- name: Install project dependencies | |
run: dotnet restore | |
- run: mkdir /app | |
- name: Compile exectuable | |
run: dotnet publish -r macos-x64 -c Release -o /app/ CloseAsteroids.csproj | |
- name: Zip executable | |
shell: Powershell | |
run: Compress-Archive -Path app/* -Destination macos-x64.zip | |
- name: Upload macos zip artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-x64 | |
path: macos-x64.zip | |
linux-x64-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.dotnet-version }} | |
- name: Install project dependencies | |
run: dotnet restore | |
- name: Install dotnet AOT dependencies | |
run: | | |
sudo apt-get update \ | |
&& sudo apt-get install -y --no-install-recommends \ | |
clang zlib1g-dev | |
- run: sudo mkdir /app | |
- name: Compile exectuable | |
run: dotnet publish -r linux-x64 -c Release -o /app/ CloseAsteroids.csproj | |
- name: Zip executable | |
shell: Powershell | |
run: Compress-Archive -Path app/* -Destination linux-x64.zip | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: ${{ github.ref_name }} | |
token: ${{ secrets.RELEASE_TOKEN }} | |
generate_release_notes: true | |
files: | | |
windows-x64.zip | |
macos-x64.zip | |
linux-x64.zip | |
- name: Delete artifacts | |
uses: geekyeggo/delete-artifact@v5 | |
if: always() | |
with: | |
name: | | |
windows-x64 | |
macos-x64 |