From 2b575b219ec5fa0d2e3967ad9a734831c8adaa8d Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 1 Oct 2020 09:55:24 +0200 Subject: [PATCH] Move conditional for tags to steps --- .github/workflows/release-pdf-on-tag.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-pdf-on-tag.yml b/.github/workflows/release-pdf-on-tag.yml index eb2c96f..2a8dbb0 100644 --- a/.github/workflows/release-pdf-on-tag.yml +++ b/.github/workflows/release-pdf-on-tag.yml @@ -1,9 +1,6 @@ name: Release pdf on tag -on: - push: - tags: - - '*' +on: [push] env: FILE: main @@ -22,6 +19,7 @@ jobs: name: main.zip path: src/*.pdf - name: Create Release + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') id: create_release uses: actions/create-release@v1 env: @@ -32,12 +30,14 @@ jobs: draft: false prerelease: false - name: Prepare output path and output name + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') id: prepare_metadata # upload-release-asset does not support wildcards or environment variables at the moment run: | echo ::set-output name=ARTIFACT_PATH::./src/$FILE.pdf echo ::set-output name=ARTIFACT_NAME::$FILE.pdf - name: Upload Release Asset + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}