Skip to content

Commit 471ecb2

Browse files
committed
fix: manual trigger with version
1 parent dd39575 commit 471ecb2

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/publish-nuget.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,12 @@ jobs:
5151
- name: Test
5252
run: dotnet test src/Base58Encoding.Tests/Base58Encoding.Tests.csproj --configuration Release --no-build --verbosity normal
5353

54-
- name: Pack (with version)
54+
- name: Pack
5555
if: env.VERSION != ''
5656
run: dotnet pack src/Base58Encoding/Base58Encoding.csproj --configuration Release --no-build --output ./artifacts -p:PackageVersion=${{ env.VERSION }}
5757

58-
- name: Pack (without version)
59-
if: env.VERSION == ''
60-
run: dotnet pack src/Base58Encoding/Base58Encoding.csproj --configuration Release --no-build --output ./artifacts
61-
6258
- name: Upload artifacts
59+
if: env.VERSION != ''
6360
uses: actions/upload-artifact@v4
6461
with:
6562
name: nupkg
@@ -68,8 +65,8 @@ jobs:
6865
publish:
6966
needs: build
7067
runs-on: ubuntu-latest
71-
# Only publish on version tags
72-
if: startsWith(github.ref, 'refs/tags/v')
68+
# Only publish on version tags or manual trigger with version
69+
if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && github.event.inputs.version != '')
7370

7471
steps:
7572
- name: Download artifacts

0 commit comments

Comments
 (0)