Skip to content

Export to variable

Export to variable #8

Workflow file for this run

name: Publish NuGet Package
on:
push:
tags:
- "*.*.*"
env:
PACKAGE_VERSION: ${{ steps.extract_version.outputs.VERSION }}

Check failure on line 8 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Publish NuGet Package

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 8, Col: 20): Unrecognized named-value: 'steps'. Located at position 1 within expression: steps.extract_version.outputs.VERSION
jobs:
release:
runs-on: windows-latest
steps:
- name: print current tag version
run: echo "$PACKAGE_VERSION ./output/Backtrace$PACKAGE_VERSION.nupkg"
- name: Checkout code
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build ./Backtrace/Backtrace.csproj --no-restore --configuration Release
- name: Pack
run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output/
- name: print current tag version
run: echo $GITHUB_REF ./output/Backtrace$GITHUB_REF.nupkg
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push ./output/Backtrace$PACKAGE_VERSION.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json