Skip to content

v0.0.1-alpha15

v0.0.1-alpha15 #9

Workflow file for this run

name: Publish on NuGet
on:
release:
types: [created]
env:
VERSION: ${{ github.event.release.tag_name }}
jobs:
publish-nuget:
runs-on: ubuntu-latest
strategy:
matrix:
package: [ Fluss, Fluss.HotChocolate, Fluss.PostgreSQL, Fluss.Regen, Fluss.Testing ]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.x
9.x
- name: Strip v from tag to determine version
run: echo "VERSION=${VERSION/v/}" >> $GITHUB_ENV
# dotnet pack says it already builds the project but it for some reason does not properly generate
# the analyzers directory when skipping an explicit build. It's unclear to me what the difference is.
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}
working-directory: src/${{ matrix.package }}
- name: Package
run: dotnet pack --no-build --configuration Release /p:Version=${VERSION}
working-directory: src/${{ matrix.package }}
- name: DEBUG - Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package }}.nupkg
path: src/${{ matrix.package }}/bin/Release
retention-days: 1
- name: Publish
run: dotnet nuget push bin/Release/${{ matrix.package }}.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
working-directory: src/${{ matrix.package }}