Remove unicorn binaries #41
This file contains hidden or 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: Build Brovan | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.platform }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: Windows x64 | |
| runner: windows-latest | |
| rid: win-x64 | |
| archive_ext: zip | |
| - platform: Linux x64 | |
| runner: ubuntu-latest | |
| rid: linux-x64 | |
| archive_ext: tar.gz | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore | |
| run: dotnet restore Brovan/Brovan.csproj | |
| - name: Publish | |
| run: dotnet publish Brovan/Brovan.csproj -c Release -r ${{ matrix.rid }} --self-contained false -o artifacts/publish/${{ matrix.rid }} | |
| - name: Package Windows artifact | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path artifacts/packages | Out-Null | |
| Compress-Archive -Path "artifacts/publish/${{ matrix.rid }}/*" -DestinationPath "artifacts/packages/Brovan-${{ matrix.rid }}.zip" | |
| - name: Package Linux artifact | |
| if: runner.os == 'Linux' | |
| shell: bash | |
| run: | | |
| mkdir -p artifacts/packages | |
| tar -C "artifacts/publish/${{ matrix.rid }}" -czf "artifacts/packages/Brovan-${{ matrix.rid }}.tar.gz" . | |
| - name: Upload CI Artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Brovan ${{ matrix.platform }} | |
| path: artifacts/packages/* | |
| retention-days: 14 | |
| release: | |
| name: Publish GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| path: release-artifacts | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create "${{ github.ref_name }}" release-artifacts/**/* | |
| --title "${{ github.ref_name }}" | |
| --generate-notes |