Skip to content

Commit 55e8091

Browse files
authored
Clean up release action (#73)
* Run actions on tag push, PRs to master/develop, pushes to master/develop * Clean up tags logic to use github.ref
1 parent dd3434b commit 55e8091

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build
22
on:
3-
push:
43
workflow_dispatch:
4+
push:
55

66
env:
77
BINARY_NAME: pluginval
@@ -153,11 +153,11 @@ jobs:
153153

154154
# Create release for tagged refs
155155
deploy:
156-
if: startsWith(github.ref, 'refs/tags/')
156+
if: contains(github.ref, 'tags/v')
157157
needs: build
158158
runs-on: ubuntu-latest
159159
steps:
160-
160+
# Needed to grab CHANGELIST.md
161161
- uses: actions/checkout@v3
162162

163163
- name: Get Artifacts
@@ -167,18 +167,12 @@ jobs:
167167

168168
- name: Display structure of downloaded files
169169
run: ls -la
170-
171-
- name: Set tag name variable
172-
shell: bash
173-
run: |
174-
REF=${GITHUB_REF}
175-
echo "TAG_NAME=${REF##*/}" >> $GITHUB_ENV
176170

177171
- name: Create Release
178172
uses: softprops/action-gh-release@v1
179173
with:
180-
tag_name: ${{ env.TAG_NAME }}
181-
name: ${{ env.TAG_NAME }}
174+
tag_name: ${{ github.ref }}
175+
name: ${{ github.ref }}
182176
body_path: CHANGELIST.md
183177
draft: true
184178
files: |

0 commit comments

Comments
 (0)