@@ -80,18 +80,18 @@ jobs:
80
80
- name : Check if should publish
81
81
id : check-publish
82
82
run : |
83
- if [[ "${{ github.event_name }}" == "push" && ("${{ github.ref }}" == "refs/heads/master" || "${{ github.ref }}" == "refs/heads/main") ]]; then
83
+ if [[ ( "${{ github.event_name }}" == "push" && ("${{ github.ref }}" == "refs/heads/master" || "${{ github.ref }}" == "refs/heads/main")) || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
84
84
echo "should-publish=true" >> $GITHUB_OUTPUT
85
- echo "Will publish packages"
85
+ echo "Will publish packages (triggered by: ${{ github.event_name }}) "
86
86
else
87
87
echo "should-publish=false" >> $GITHUB_OUTPUT
88
- echo "Will not publish packages (not a push to main/master branch )"
88
+ echo "Will not publish packages (event: ${{ github.event_name }}, ref: ${{ github.ref }} )"
89
89
fi
90
90
91
91
- name : Upload build artifacts
92
92
uses : actions/upload-artifact@v4
93
93
with :
94
- name : ${{ env.ARTIFACT_NAME }}
94
+ name : ${{ env.ARTIFACT_NAME }}-${{ steps.version.outputs.version }}
95
95
path : ./artifacts/*.nupkg
96
96
if-no-files-found : error
97
97
@@ -113,7 +113,7 @@ jobs:
113
113
- name : Download artifacts
114
114
uses : actions/download-artifact@v4
115
115
with :
116
- name : ${{ env.ARTIFACT_NAME }}
116
+ name : ${{ env.ARTIFACT_NAME }}-${{ needs.build-and-test.outputs.version }}
117
117
path : ./artifacts
118
118
119
119
- name : Publish to GitHub Packages
@@ -138,7 +138,7 @@ jobs:
138
138
- name : Download artifacts
139
139
uses : actions/download-artifact@v4
140
140
with :
141
- name : ${{ env.ARTIFACT_NAME }}
141
+ name : ${{ env.ARTIFACT_NAME }}-${{ needs.build-and-test.outputs.version }}
142
142
path : ./artifacts
143
143
144
144
- name : Publish to NuGet.org
@@ -163,7 +163,7 @@ jobs:
163
163
- name : Download artifacts
164
164
uses : actions/download-artifact@v4
165
165
with :
166
- name : ${{ env.ARTIFACT_NAME }}
166
+ name : ${{ env.ARTIFACT_NAME }}-${{ needs.build-and-test.outputs.version }}
167
167
path : ./artifacts
168
168
169
169
- name : Create Release
0 commit comments