Skip to content

Commit 4c8bce1

Browse files
authored
Update release-nuget.yml
1 parent b3f5e05 commit 4c8bce1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/release-nuget.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
tags:
66
- "v[0-9]+.[0-9]+.[0-9]+"
77
- "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+"
8+
89
jobs:
910
release-nuget:
10-
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -19,11 +19,11 @@ jobs:
1919
- name: Get version information from tag
2020
id: get_version
2121
run: |
22-
$version="${{github.ref_name}}".TrimStart("v")
23-
"version-without-v=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
22+
version="${GITHUB_REF_NAME#v}"
23+
echo "version-without-v=$version" >> $GITHUB_OUTPUT
2424
- name: Pack
25-
run: dotnet pack src\Ecia.Barcode.Parser.sln -c Release -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }}
25+
run: dotnet pack src/Ecia.Barcode.Parser.sln -c Release -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }}
2626
- name: Push
27-
run: dotnet nuget push src\Ecia.Barcode.Parser\bin\Release\Ecia.Barcode.Parser.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
27+
run: dotnet nuget push src/Ecia.Barcode.Parser/bin/Release/Ecia.Barcode.Parser.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
2828
env:
29-
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}
29+
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}

0 commit comments

Comments
 (0)