Skip to content

Commit 29953ff

Browse files
change tag processing
1 parent 9cc4de1 commit 29953ff

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ jobs:
1717
- name: Setup .NET
1818
uses: actions/setup-dotnet@v4
1919
with:
20-
dotnet-version: "8.0.x" # Adjust to your .NET version
20+
dotnet-version: "8.0.x"
21+
22+
- name: Extract version from tag
23+
id: extract_version
24+
run: |
25+
TAG=${{ github.ref_name }}
26+
VERSION=${TAG#v} # Removes 'v' prefix
27+
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
2128
2229
- name: Restore dependencies
2330
run: dotnet restore ./src/DataStax.AstraDB.DataApi/
@@ -26,9 +33,7 @@ jobs:
2633
run: dotnet build ./src/DataStax.AstraDB.DataApi/ --configuration Release --no-restore
2734

2835
- name: Pack
29-
run: dotnet pack ./src/DataStax.AstraDB.DataApi/ --configuration Release --no-build --output nupkgs -p:Version=${{ env.PACKAGE_VERSION }}
30-
env:
31-
PACKAGE_VERSION: ${{ replace(github.ref_name, 'v', '') }}
36+
run: dotnet pack ./src/DataStax.AstraDB.DataAPI/ --configuration Release --no-build --output nupkgs -p:Version=${{ env.PACKAGE_VERSION }}
3237

3338
# - name: Push to NuGet
3439
# run: dotnet nuget push nupkgs/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)