Skip to content

Commit 2b575b2

Browse files
committed
Move conditional for tags to steps
1 parent b9d1127 commit 2b575b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/release-pdf-on-tag.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Release pdf on tag
22

3-
on:
4-
push:
5-
tags:
6-
- '*'
3+
on: [push]
74

85
env:
96
FILE: main
@@ -22,6 +19,7 @@ jobs:
2219
name: main.zip
2320
path: src/*.pdf
2421
- name: Create Release
22+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
2523
id: create_release
2624
uses: actions/create-release@v1
2725
env:
@@ -32,12 +30,14 @@ jobs:
3230
draft: false
3331
prerelease: false
3432
- name: Prepare output path and output name
33+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
3534
id: prepare_metadata
3635
# upload-release-asset does not support wildcards or environment variables at the moment
3736
run: |
3837
echo ::set-output name=ARTIFACT_PATH::./src/$FILE.pdf
3938
echo ::set-output name=ARTIFACT_NAME::$FILE.pdf
4039
- name: Upload Release Asset
40+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
4141
uses: actions/upload-release-asset@v1
4242
env:
4343
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)