-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (37 loc) · 1.31 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: release
on:
workflow_run:
workflows: [build]
branches: [v**]
types: [completed]
jobs:
publish-release:
runs-on: ubuntu-latest
# Kinda bad since it might release on any branch starting with v, but it'll do for now.
# Tag filtering in "on:" doesn't work, since the inital build trigger gets lost.
# github.ref is therefore also being reset to "refs/head/master".
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download windows artifact
uses: dawidd6/action-download-artifact@v3
with:
workflow: build.yml
name: spoon.exe
- name: Create pre-release
uses: softprops/action-gh-release@v1
if: contains(github.event.workflow_run.head_branch, 'pre')
with:
name: ${{ github.event.workflow_run.head_branch }}
tag_name: ${{ github.event.workflow_run.head_branch }}
prerelease: true
files: |
spoon.exe
- name: Create release
uses: softprops/action-gh-release@v1
if: "!contains(github.event.workflow_run.head_branch, 'pre')"
with:
name: ${{ github.event.workflow_run.head_branch }}
tag_name: ${{ github.event.workflow_run.head_branch }}
prerelease: false
files: |
spoon.exe