Skip to content

Commit ec43b5c

Browse files
MichaCMichaC
authored andcommitted
ok lets try this out
1 parent 933ca35 commit ec43b5c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: CI/CD
33
on:
44
push:
55
branches: [ main ]
6-
tags: [ 'v*.*.*' ]
6+
tags:
7+
- 'v[0-9]*.[0-9]*.[0-9]*' # stable: v1.0.0
8+
- 'v[0-9]*.[0-9]*.[0-9]*-*' # pre-release: v1.0.0-beta
79
pull_request:
810
branches: [ main ]
911
workflow_dispatch:
@@ -118,7 +120,10 @@ jobs:
118120
run: dotnet build --no-restore -c Release
119121

120122
- name: Pack
121-
run: dotnet pack src/CDT.Core/CDT.Core.csproj --no-build -c Release -o ./artifacts
123+
shell: pwsh
124+
run: |
125+
$version = "${{ github.ref_name }}" -replace '^v', ''
126+
dotnet pack src/CDT.Core/CDT.Core.csproj --no-build -c Release -o ./artifacts /p:Version=$version
122127
123128
- name: Push to NuGet.org
124129
# Requires a NUGET_API_KEY secret configured in:

0 commit comments

Comments
 (0)