2020
2121jobs :
2222 create-nightly-artifacts :
23+ outputs :
24+ version : ${{ steps.get-version.outputs.version }}
2325 runs-on : ubuntu-latest
2426
2527 strategy :
5052 NIGHTLY : true
5153 run : task dist:${{ matrix.os }}
5254
55+ - name : Output Version
56+ id : get-version
57+ env :
58+ NIGHTLY : true
59+ run : echo "::set-output name=version::$(task get-version)"
60+
5361 - name : Upload artifacts
5462 uses : actions/upload-artifact@v3
5563 with :
@@ -144,8 +152,8 @@ jobs:
144152 # GitHub's upload/download-artifact@v2 actions don't preserve file permissions,
145153 # so we need to add execution permission back until the action is made to do this.
146154 chmod +x "${{ env.PROJECT_NAME }}_osx_${{ matrix.artifact.name }}/${{ env.PROJECT_NAME }}"
147- # Use of an array here is required for globbing
148- PACKAGE_FILENAME=(${{ env.PROJECT_NAME }}_nightly-* ${{ matrix.artifact.path }})
155+ VERSION=${{ needs.create-nightly-artifacts.outputs.version }}
156+ PACKAGE_FILENAME=(${{ env.PROJECT_NAME }}_${VERSION}_ ${{ matrix.artifact.path }})
149157 tar -czvf "$PACKAGE_FILENAME" \
150158 -C "${{ env.PROJECT_NAME }}_osx_${{ matrix.artifact.name }}/" "${{ env.PROJECT_NAME }}" \
151159 -C ../../ LICENSE.txt
@@ -189,10 +197,11 @@ jobs:
189197 - name : Build MSI
190198 id : buildmsi
191199 run : |
192- WIX_TAG="0.0.0" # use 0.0.0 as version for the installer since wix is picky about other alternatives, this only affects nightly builds (error CNDL0242)
193- PACKAGE_FILENAME="${{ env.PROJECT_NAME }}_${TAG}_Windows_64bit"
200+ VERSION=${{ needs.create-nightly-artifacts.outputs.version }}
201+ WIX_VERSION="0.0.0" # use 0.0.0 as version for the installer since wix is picky about other alternatives, this only affects nightly builds (error CNDL0242)
202+ PACKAGE_FILENAME="${{ env.PROJECT_NAME }}_${VERSION}_Windows_64bit"
194203 SOURCE_DIR="${GITHUB_WORKSPACE}/${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_windows_amd64/"
195- MSBuild.exe ./installer/cli.wixproj -p:SourceDir="$SOURCE_DIR" -p:OutputPath="${GITHUB_WORKSPACE}/${{ env.DIST_DIR }}" -p:OutputName="$PACKAGE_FILENAME" -p:ProductVersion="$WIX_TAG "
204+ MSBuild.exe ./installer/cli.wixproj -p:SourceDir="$SOURCE_DIR" -p:OutputPath="${GITHUB_WORKSPACE}/${{ env.DIST_DIR }}" -p:OutputName="$PACKAGE_FILENAME" -p:ProductVersion="$WIX_VERSION "
196205
197206 - name : Save Win signing certificate to file
198207 run : echo "${{ secrets.INSTALLER_CERT_WINDOWS_PFX }}" | base64 --decode > ${{ env.INSTALLER_CERT_WINDOWS_PFX}}
@@ -216,6 +225,7 @@ jobs:
216225 publish-nightly :
217226 runs-on : ubuntu-latest
218227 needs :
228+ - create-nightly-artifacts
219229 - notarize-macos
220230 - create-windows-installer
221231
@@ -229,8 +239,8 @@ jobs:
229239 - name : Output checksum
230240 working-directory : ${{ env.DIST_DIR}}
231241 run : |
232- TAG="nightly-$(date -u +"%Y%m%d")"
233- sha256sum ${{ env.PROJECT_NAME }}_${TAG }* >> ${TAG }-checksums.txt
242+ VERSION=${{ needs.create-nightly-artifacts.outputs.version }}
243+ sha256sum ${{ env.PROJECT_NAME }}_${VERSION }* >> ${VERSION }-checksums.txt
234244
235245 # - name: Upload release files on Arduino downloads servers
236246 # uses: docker://plugins/s3
0 commit comments