Skip to content

Commit

Permalink
Move conditional for tags to steps
Browse files Browse the repository at this point in the history
  • Loading branch information
PHPirates committed Oct 1, 2020
1 parent b9d1127 commit 2b575b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release-pdf-on-tag.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Release pdf on tag

on:
push:
tags:
- '*'
on: [push]

env:
FILE: main
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down

0 comments on commit 2b575b2

Please sign in to comment.