CICD: Build: Check IS_RELEASE in separate step

And move it closer to where it is actually needed, to reduce its scope.

For #1474
This commit is contained in:
Martin Nordholts 2021-02-17 15:12:12 +01:00 committed by David Peter
parent 94fd481f36
commit b98ec4bbc5
1 changed files with 7 additions and 3 deletions

View File

@ -114,8 +114,6 @@ jobs:
id: vars
shell: bash
run: |
unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
echo ::set-output name=IS_RELEASE::${IS_RELEASE}
# target-specific options
# # * test only library unit tests and binary for arm-type targets
unset CARGO_TEST_OPTIONS
@ -376,9 +374,15 @@ jobs:
with:
name: ${{ steps.debian-package.outputs.DPKG_NAME }}
path: ${{ steps.debian-package.outputs.DPKG_PATH }}
- name: Check is release
id: is-release
shell: bash
run: |
unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
echo ::set-output name=IS_RELEASE::${IS_RELEASE}
- name: Publish archives and packages
uses: softprops/action-gh-release@v1
if: steps.vars.outputs.IS_RELEASE
if: steps.is-release.outputs.IS_RELEASE
with:
files: |
${{ steps.package.outputs.PKG_PATH }}