Skip to content

Dotnet pack needs source code in stead of build artifacts #10

Dotnet pack needs source code in stead of build artifacts

Dotnet pack needs source code in stead of build artifacts #10

Workflow file for this run

name: release
on:
push:
tags:
- 'v*' # This triggers the action on new version tags
jobs:
build:
uses: ./.github/workflows/build.yml # Call the reusable build workflow
release:
runs-on: ubuntu-latest
needs: build # Ensure the build job completes first
steps:
- name: Set version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Pack .NET tool
run: dotnet pack ./Dotty.CLI/Dotty.CLI.csproj --configuration Release -p:Version=${{ env.VERSION }} --output ./out
- name: Publish to NuGet
run: dotnet nuget push ./out/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }}