17
17
18
18
jobs :
19
19
create-release-artifacts :
20
+ outputs :
21
+ version : ${{ steps.get-version.outputs.version }}
20
22
runs-on : ubuntu-latest
21
23
22
24
strategy :
57
59
- name : Build
58
60
run : task dist:${{ matrix.os }}
59
61
62
+ - name : Output Version
63
+ id : get-version
64
+ run : echo "::set-output name=version::$(task get-version)"
65
+
60
66
- name : Upload artifacts
61
67
uses : actions/upload-artifact@v3
62
68
with :
@@ -151,7 +157,7 @@ jobs:
151
157
# GitHub's upload/download-artifact@v2 actions don't preserve file permissions,
152
158
# so we need to add execution permission back until the action is made to do this.
153
159
chmod +x "${{ env.PROJECT_NAME }}_osx_${{ matrix.artifact.name }}/${{ env.PROJECT_NAME }}"
154
- TAG="${GITHUB_REF/refs\/tags\//}"
160
+ TAG=${{ needs.create-release-artifacts.outputs.version }}
155
161
PACKAGE_FILENAME="${{ env.PROJECT_NAME }}_${TAG}_${{ matrix.artifact.path }}"
156
162
tar -czvf "$PACKAGE_FILENAME" \
157
163
-C "${{ env.PROJECT_NAME }}_osx_${{ matrix.artifact.name }}/" "${{ env.PROJECT_NAME }}" \
@@ -196,7 +202,7 @@ jobs:
196
202
- name : Build MSI
197
203
id : buildmsi
198
204
run : |
199
- TAG="${GITHUB_REF/refs\/tags\//}"
205
+ TAG=${{ needs.create-release-artifacts.outputs.version }}
200
206
WIX_TAG="${TAG%%-*}" # removes "-rc*" since wix is not happy with it, this only affects RCs builds (error CNDL0108)
201
207
PACKAGE_FILENAME="${{ env.PROJECT_NAME }}_${TAG}_Windows_64bit"
202
208
SOURCE_DIR="${GITHUB_WORKSPACE}/${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_windows_amd64/"
@@ -224,6 +230,7 @@ jobs:
224
230
create-release :
225
231
runs-on : ubuntu-latest
226
232
needs :
233
+ - create-release-artifacts
227
234
- notarize-macos
228
235
- create-windows-installer
229
236
@@ -237,7 +244,7 @@ jobs:
237
244
- name : Output checksum
238
245
working-directory : ${{ env.DIST_DIR}}
239
246
run : |
240
- TAG="${GITHUB_REF/refs\/tags\//}"
247
+ TAG=${{ needs.create-release-artifacts.outputs.version }}
241
248
sha256sum ${{ env.PROJECT_NAME }}_${TAG}* >> ${TAG}-checksums.txt
242
249
243
250
- name : Identify Prerelease
@@ -247,7 +254,7 @@ jobs:
247
254
run : |
248
255
wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.0.0.zip
249
256
unzip -p /tmp/3.0.0.zip semver-tool-3.0.0/src/semver >/tmp/semver && chmod +x /tmp/semver
250
- if [[ "$(/tmp/semver get prerel "${GITHUB_REF/refs\/tags\//}" )" ]]; then echo "::set-output name=IS_PRE::true"; fi
257
+ if [[ "$(/tmp/semver get prerel ${{ needs.create-release-artifacts.outputs.version }} )" ]]; then echo "::set-output name=IS_PRE::true"; fi
251
258
252
259
- name : Create Github Release and upload artifacts
253
260
uses : ncipollo/release-action@v1
0 commit comments