1
1
name : release
2
2
3
3
on :
4
- release :
5
- types :
6
- - created
4
+ push :
5
+ tags :
6
+ - " v[0-9]+"
7
+ workflow_dispatch :
7
8
8
9
jobs :
9
10
build :
10
11
uses : ./.github/workflows/build.yml
11
- with :
12
- ref : refs/tags/${{ github.event.release.tag_name }}
13
12
14
13
bump-version :
15
14
needs :
20
19
container :
21
20
image : ghcr.io/ddterm/ci-docker-image:2023.12.26.0
22
21
23
- permissions :
24
- contents : write
25
-
26
22
steps :
27
23
- name : Get app token
28
24
id : app-token
@@ -41,12 +37,12 @@ jobs:
41
37
42
38
- name : Check branch SHA matches tag SHA
43
39
run : |
44
- git fetch origin "refs/tags/ ${{ github.event.release.tag_name }}"
40
+ git fetch origin "${{ github.ref }}"
45
41
test "$(git rev-parse HEAD)" = "$(git rev-parse FETCH_HEAD)"
46
42
47
43
- name : Check version matches the tag
48
44
run : |
49
- test "v$(jq .version metadata.json.in)" = "${{ github.event.release.tag_name }}"
45
+ test "v$(jq .version metadata.json.in)" = "${{ github.ref_name }}"
50
46
51
47
- name : Bump version
52
48
run : |
@@ -58,22 +54,29 @@ jobs:
58
54
token : ${{ steps.app-token.outputs.token }}
59
55
commit-message : ' Post-release version bump [ci skip]'
60
56
61
- upload-artifacts :
57
+ draft :
62
58
needs :
63
59
- build
64
60
- bump-version
65
61
66
62
runs-on : ubuntu-latest
67
63
68
- permissions :
69
- contents : write
70
-
71
64
steps :
65
+ - name : Get app token
66
+ id : app-token
67
+ uses : actions/create-github-app-token@v1
68
+ with :
69
+ app-id : ${{ secrets.APP_ID }}
70
+ private-key : ${{ secrets.APP_KEY }}
71
+
72
72
- uses : actions/download-artifact@v4
73
73
with :
74
74
name : pack
75
75
76
- - run : |
77
- gh release upload ${{ github.ref_name }} *.shell-extension.zip
78
- env:
79
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76
+ - uses : softprops/action-gh-release@v1
77
+ with :
78
+ token : ${{ steps.app-token.outputs.token }}
79
+ files : " *.shell-extension.zip"
80
+ fail_on_unmatched_files : true
81
+ draft : true
82
+ generate_release_notes : true
0 commit comments