File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ name: Build artifact.
2
2
3
3
on :
4
4
push :
5
+ tags :
6
+ - " v*"
5
7
branches : ' *'
6
8
pull_request :
7
9
branches : ' *'
8
10
workflow_dispatch :
9
- schedule :
10
- - cron : ' 0 0 1 * *'
11
11
12
12
jobs :
13
13
21
21
with :
22
22
submodules : recursive
23
23
24
+ # get version from pushed tag
25
+ - name : Extract version
26
+ if : startsWith(github.ref, 'refs/tags/v')
27
+ id : version
28
+ run : |
29
+ echo "TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_OUTPUT}
30
+ echo "VERSION=${GITHUB_REF#refs/tags/v}" >> ${GITHUB_OUTPUT}
24
31
25
32
# Install the .NET Core workload
26
33
- name : Install .NET
48
55
name : " AmpHelper"
49
56
path : publish/AmpHelper.CLI.Self-Contained/AmpHelper.exe
50
57
retention-days : 90
58
+
59
+ # if we had a tag, we should make a release
60
+ - name : Upload release artifacts
61
+ if : startsWith(github.ref, 'refs/tags/v')
62
+ id : upload_file_release
63
+
64
+ with :
65
+ tag_name : ${{ github.event.inputs.version }}
66
+ draft : false
67
+ generate_release_notes : true
68
+ files : |
69
+ ./publish/AmpHelper.CLI.Self-Contained/AmpHelper.exe
70
+ env :
71
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72
+
You can’t perform that action at this time.
0 commit comments