Skip to content

Commit 81cca5b

Browse files
authored
Merge pull request #8 from elastacloud/feature/dotprompt-sql-upgrade
Fix release workflow to trigger on tag push and use tag as version
2 parents ab0b03a + 8bd9283 commit 81cca5b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/release.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: release
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
tags:
6+
- 'v*'
57

68
jobs:
79
build:
@@ -15,14 +17,12 @@ jobs:
1517
uses: actions/setup-dotnet@v4
1618
with:
1719
dotnet-version: 9.0.x
18-
- name: Get latest tag version
20+
- name: Get version from tag
1921
id: vars
20-
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
22+
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
2123
- name: Package
22-
env:
23-
RELEASE_VERSION: ${{ env.tag }}
2424
run: |
2525
echo "Release version: $RELEASE_VERSION"
26-
dotnet pack -p:PackageVersion=0.2.2
26+
dotnet pack -p:PackageVersion=$RELEASE_VERSION
2727
dotnet nuget push DotPrompt.Sql/nupkg/*.nupkg -k ${{ secrets.AZURECODER_NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
2828

0 commit comments

Comments
 (0)