copy IS_RELEASE condition so there must not be on every step the condition

This commit is contained in:
Martin Marmsoler 2022-04-26 19:42:32 +02:00
parent 22a7e243ff
commit 9b8a2b9be2

View File

@ -267,18 +267,17 @@ jobs:
runs-on: ubuntu-latest # does not matter which
# a prerelase is created when pushing to master
# a release is created when a tag will be set
# currently it is not supported to have access the env variable here
# therefore it has to be added to every step.
# if: ${{ github.ref == 'refs/heads/master' || env.IS_RELEASE}}
# last condition is the same as IS_RELEASE,
# but environment variables cannot be used outside of steps
# so it was copied to here too
if: ${{ github.ref == 'refs/heads/master' || (github.event_name == 'push' && github.ref_type == 'tag' && startswith(github.ref_name, 'gittyup_v')) }}
steps:
- name: Download artifacts
if: ${{ github.ref == 'refs/heads/master' || env.IS_RELEASE}}
uses: actions/download-artifact@v2
with:
path: artifacts
- name: list artifacts folder
if: ${{ github.ref == 'refs/heads/master' || env.IS_RELEASE}}
run: |
echo "Show artifacts folder:"
ls artifacts
@ -291,13 +290,11 @@ jobs:
# version is exported from cmake to file
- name: Retrieve version
if: ${{ github.ref == 'refs/heads/master' || env.IS_RELEASE}}
run: |
echo "::set-output name=VERSION::$(cat artifacts/Gittyup-VERSION/VERSION.txt)"
id: version
- name: Determine release title
if: ${{ github.ref == 'refs/heads/master' || env.IS_RELEASE}}
uses: haya14busa/action-cond@v1
id: release_title
with:
@ -306,7 +303,6 @@ jobs:
if_false: 'Latest Build (Development)'
- name: Determine release tag
if: ${{ github.ref == 'refs/heads/master' || env.IS_RELEASE}}
uses: haya14busa/action-cond@v1
id: release_tag
with:
@ -315,7 +311,6 @@ jobs:
if_false: 'latest'
- name: Update GitHub release
if: ${{ github.ref == 'refs/heads/master' || env.IS_RELEASE}}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}