Skip to content

Commit

Permalink
fix the use of github.ref.
Browse files Browse the repository at this point in the history
  • Loading branch information
Readon committed Oct 28, 2023
1 parent b288f87 commit 5d610f2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,29 +184,27 @@ jobs:

- name: Set Release Tag
id: set_tag
if: github.ref == ''
if: startsWith(github.ref, 'refs/heads/')
run: echo "::set-output name=tag_name::draft-$(date +'%Y%m%d%H%M%S')"

- name: Upload Installers
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/heads/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
if: github.ref == ''
tag_name: ${{ steps.set_tag.outputs.tag_name }}
draft: ${{ github.ref == '' }}
draft: true
body: ${{ github.event.head_commit.message }}
files: |
msys2-*
- name: Upload Installers with Tag
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
if: github.ref != ''
tag_name: ${{ github.ref }}
draft: ${{ github.ref == '' }}
body: ${{ github.event.head_commit.message }}
files: |
msys2-*

0 comments on commit 5d610f2

Please sign in to comment.