Skip to content

.NET

.NET #2

Workflow file for this run

# 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

View workflow run for this annotation

GitHub Actions / .NET

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 32, Col: 11): Unexpected symbol: '"ubuntu-latest"'. Located at position 14 within expression: matrix.os == "ubuntu-latest" .github/workflows/publish.yml (Line: 37, Col: 11): Unexpected symbol: '"ubuntu-latest"'. Located at position 14 within expression: matrix.os == "ubuntu-latest"
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