diff options
author | Martin Nordholts <enselic@gmail.com> | 2021-01-09 21:10:11 +0100 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2021-01-10 10:56:15 +0100 |
commit | e3b114236452dc5a9084f623b3bd4b39100edd15 (patch) | |
tree | 974abd884c40ed9201453079f6822fbc40ce7910 /.github | |
parent | 8832ff3c6a0eafae6eded3389c83739b0719a355 (diff) |
CICD: Build: DEPLOY -> IS_RELEASE and inline it
This simplifies and clarifies the script.
For #1474
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/CICD.yml | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index b2753d0d..0899efee 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -115,17 +115,14 @@ jobs: # determine EXE suffix EXE_suffix="" ; case ${{ matrix.job.target }} in *-pc-windows-*) EXE_suffix=".exe" ;; esac; echo ::set-output name=EXE_suffix::${EXE_suffix} - # parse commit reference info - unset REF_TAG ; case ${GITHUB_REF} in refs/tags/*) REF_TAG=${GITHUB_REF#refs/tags/} ;; esac; # package name PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac; PKG_BASENAME=${PROJECT_NAME}-v${PROJECT_VERSION}-${{ matrix.job.target }} PKG_NAME=${PKG_BASENAME}${PKG_suffix} echo ::set-output name=PKG_BASENAME::${PKG_BASENAME} echo ::set-output name=PKG_NAME::${PKG_NAME} - # deployable tag? (ie, leading "vM" or "M"; M == version number) - unset DEPLOY ; if [[ $REF_TAG =~ ^v[0-9].* ]]; then DEPLOY='true' ; fi - echo ::set-output name=DEPLOY::${DEPLOY} + unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi + echo ::set-output name=IS_RELEASE::${IS_RELEASE} # DPKG architecture? unset DPKG_ARCH case ${{ matrix.job.target }} in @@ -351,7 +348,7 @@ jobs: path: ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.DPKG_NAME }} - name: Publish archives and packages uses: softprops/action-gh-release@v1 - if: steps.vars.outputs.DEPLOY + if: steps.vars.outputs.IS_RELEASE with: files: | ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_NAME }} |