Skip to content

Display the git tag value #12

Display the git tag value

Display the git tag value #12

Workflow file for this run

name: Publish NuGet Package
on:
push:
tags:
- "*.*.*"
jobs:
release:
runs-on: windows-latest
steps:
- name: Extract version from tag
id: extract_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $env:GITHUB_ENV
shell: pwsh
- name: Verify extracted version
run: echo "Extracted version is: $env:VERSION"

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

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 19
shell: pwsh
- 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