1717
1818jobs :
1919 create-release-artifacts :
20+ outputs :
21+ version : ${{ steps.get-version.outputs.version }}
2022 runs-on : ubuntu-latest
2123
2224 strategy :
5759 - name : Build
5860 run : task dist:${{ matrix.os }}
5961
62+ - name : Output Version
63+ id : get-version
64+ run : echo "::set-output name=version::$(task get-version)"
65+
6066 - name : Upload artifacts
6167 uses : actions/upload-artifact@v3
6268 with :
@@ -151,7 +157,7 @@ jobs:
151157 # GitHub's upload/download-artifact@v2 actions don't preserve file permissions,
152158 # so we need to add execution permission back until the action is made to do this.
153159 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 }}
155161 PACKAGE_FILENAME="${{ env.PROJECT_NAME }}_${TAG}_${{ matrix.artifact.path }}"
156162 tar -czvf "$PACKAGE_FILENAME" \
157163 -C "${{ env.PROJECT_NAME }}_osx_${{ matrix.artifact.name }}/" "${{ env.PROJECT_NAME }}" \
@@ -196,7 +202,7 @@ jobs:
196202 - name : Build MSI
197203 id : buildmsi
198204 run : |
199- TAG="${GITHUB_REF/refs\/tags\//}"
205+ TAG=${{ needs.create-release-artifacts.outputs.version }}
200206 WIX_TAG="${TAG%%-*}" # removes "-rc*" since wix is not happy with it, this only affects RCs builds (error CNDL0108)
201207 PACKAGE_FILENAME="${{ env.PROJECT_NAME }}_${TAG}_Windows_64bit"
202208 SOURCE_DIR="${GITHUB_WORKSPACE}/${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_windows_amd64/"
@@ -224,6 +230,7 @@ jobs:
224230 create-release :
225231 runs-on : ubuntu-latest
226232 needs :
233+ - create-release-artifacts
227234 - notarize-macos
228235 - create-windows-installer
229236
@@ -237,7 +244,7 @@ jobs:
237244 - name : Output checksum
238245 working-directory : ${{ env.DIST_DIR}}
239246 run : |
240- TAG="${GITHUB_REF/refs\/tags\//}"
247+ TAG=${{ needs.create-release-artifacts.outputs.version }}
241248 sha256sum ${{ env.PROJECT_NAME }}_${TAG}* >> ${TAG}-checksums.txt
242249
243250 - name : Identify Prerelease
@@ -247,7 +254,7 @@ jobs:
247254 run : |
248255 wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.0.0.zip
249256 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
251258
252259 - name : Create Github Release and upload artifacts
253260 uses : ncipollo/release-action@v1
0 commit comments