Browse Source

Actions set-output is only scoped within the same job id

pull/880/head
Hamish Coleman 3 years ago
parent
commit
65062ca594
  1. 15
      .github/workflows/tests.yml

15
.github/workflows/tests.yml

@ -483,8 +483,8 @@ jobs:
# it seems strange that there is no simple way to trigger actions if the # it seems strange that there is no simple way to trigger actions if the
# tag is annotated. So we need to jump through some hoops. # tag is annotated. So we need to jump through some hoops.
# #
get_tagtype: upload_release:
name: Get the type of Tag name: Upload Release Assets
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
needs: needs:
- package_dpkg - package_dpkg
@ -496,24 +496,19 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set variable - name: Get Tag Type
run: | run: |
echo '::set-output name=TAGTYPE::$(git cat-file -t $GITHUB_REF)' echo '::set-output name=TAGTYPE::$(git cat-file -t $GITHUB_REF)'
upload_release:
name: Upload Release Assets
if: steps.get_tagtype.outputs.TAGTYPE == 'tag'
needs:
- get_tagtype
runs-on: ubuntu-latest
steps: steps:
- name: Fetch all Artifacts - name: Fetch all Artifacts
if: steps.get_tagtype.outputs.TAGTYPE == 'tag'
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
path: artifacts path: artifacts
- name: Upload Assets to Release - name: Upload Assets to Release
if: steps.get_tagtype.outputs.TAGTYPE == 'tag'
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
prerelease: true prerelease: true

Loading…
Cancel
Save