.NET #2
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
# This workflow will build a .NET project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
name: .NET | ||
on: | ||
release: | ||
types: ["published"] | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
env: | ||
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Set up butler | ||
uses: jdno/[email protected] | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Publish | ||
run: dotnet publish -c Release -o ./release --self-contained | ||
- name: Create tar.gz package | ||
if: ${{ matrix.os == "ubuntu-latest" }} | ||
Check failure on line 32 in .github/workflows/publish.yml GitHub Actions / .NETInvalid workflow file
|
||
run: | | ||
tar -czvf linux-x64-${{ github.ref }}.tar.gz ./release | ||
butler push linux-x64-${{ github.ref }}.tar.gz yesseruser/pong:linux-x64 | ||
- name: Publish linux to release | ||
if: ${{ matrix.os == "ubuntu-latest" }} | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: linux-x64-${{ github.ref }}.tar.gz | ||
- name: Create zip package | ||
if: ${{ matrix.os == "windows-latest" }} | ||
run: | | ||
7z a windows-x64-${{ github.ref }}.zip .\release\* | ||
butler push windows-x64-${{ github.ref }}.zip yesseruser/pong:win64 | ||
- name: Publish windows to release | ||
if: ${{ matrix.os == "windows-latest" }} | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: windows-x64-${{ github.ref }}.zip | ||
build-flatpak: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x |