@@ -166,19 +166,31 @@ jobs:
166166 run : if [[ $(find packed -maxdepth 1 -name 'WoofWare.DotnetRuntimeLocator.*.nupkg' -printf c | wc -c) -ne "1" ]]; then exit 1; fi
167167
168168 github-release-dry-run :
169- needs : [nuget-pack]
170169 runs-on : ubuntu-latest
170+ needs : [nuget-pack]
171171 steps :
172172 - uses : actions/checkout@v4
173173 - name : Download NuGet artifact
174174 uses : actions/download-artifact@v4
175175 with :
176176 name : nuget-package
177- - name : Tag and release
177+ - name : Compute package path
178+ id : compute-path
179+ run : |
180+ find . -maxdepth 1 -type f -name 'WoofWare.DotnetRuntimeLocator.*.nupkg' -exec sh -c 'echo "output=$(basename "$1")" >> $GITHUB_OUTPUT' shell {} \;
181+ - name : Compute tag name
182+ id : compute-tag
178183 env :
179- DRY_RUN : 1
180- GITHUB_TOKEN : mock-token
181- run : sh .github/workflows/tag.sh
184+ NUPKG_PATH : ${{ steps.compute-path.outputs.output }}
185+ run : echo "output=$(basename "$NUPKG_PATH" .nupkg)" >> $GITHUB_OUTPUT
186+ - name : Tag and release
187+ uses : G-Research/common-actions/github-release@19d7281a0f9f83e13c78f99a610dbc80fc59ba3b
188+ with :
189+ github-token : ${{ secrets.GITHUB_TOKEN }}
190+ target-commitish : ${{ github.sha }}
191+ tag : ${{ steps.compute-tag.outputs.output }}
192+ binary-contents : ${{ steps.compute-path.outputs.output }}
193+ dry-run : true
182194
183195 all-required-checks-complete :
184196 if : ${{ always() }}
@@ -253,7 +265,19 @@ jobs:
253265 uses : actions/download-artifact@v4
254266 with :
255267 name : nuget-package
256- - name : Tag and release
268+ - name : Compute package path
269+ id : compute-path
270+ run : |
271+ find . -maxdepth 1 -type f -name 'WoofWare.DotnetRuntimeLocator.*.nupkg' -exec sh -c 'echo "output=$(basename "$1")" >> $GITHUB_OUTPUT' shell {} \;
272+ - name : Compute tag name
273+ id : compute-tag
257274 env :
258- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
259- run : sh .github/workflows/tag.sh
275+ NUPKG_PATH : ${{ steps.compute-path.outputs.output }}
276+ run : echo "output=$(basename "$NUPKG_PATH" .nupkg)" >> $GITHUB_OUTPUT
277+ - name : Tag and release
278+ uses : G-Research/common-actions/github-release@19d7281a0f9f83e13c78f99a610dbc80fc59ba3b
279+ with :
280+ github-token : ${{ secrets.GITHUB_TOKEN }}
281+ target-commitish : ${{ github.sha }}
282+ tag : ${{ steps.compute-tag.outputs.output }}
283+ binary-contents : ${{ steps.compute-path.outputs.output }}
0 commit comments