Skip to content

Commit 751e218

Browse files
committed
ci/release: revert to softprops/action-gh-release
1 parent c8b0f3d commit 751e218

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
name: release
22

33
on:
4-
release:
5-
types:
6-
- created
4+
push:
5+
tags:
6+
- "v[0-9]+"
7+
workflow_dispatch:
78

89
jobs:
910
build:
1011
uses: ./.github/workflows/build.yml
11-
with:
12-
ref: refs/tags/${{ github.event.release.tag_name }}
1312

1413
bump-version:
1514
needs:
@@ -20,9 +19,6 @@ jobs:
2019
container:
2120
image: ghcr.io/ddterm/ci-docker-image:2023.12.26.0
2221

23-
permissions:
24-
contents: write
25-
2622
steps:
2723
- name: Get app token
2824
id: app-token
@@ -41,12 +37,12 @@ jobs:
4137

4238
- name: Check branch SHA matches tag SHA
4339
run: |
44-
git fetch origin "refs/tags/${{ github.event.release.tag_name }}"
40+
git fetch origin "${{ github.ref }}"
4541
test "$(git rev-parse HEAD)" = "$(git rev-parse FETCH_HEAD)"
4642
4743
- name: Check version matches the tag
4844
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 }}"
5046
5147
- name: Bump version
5248
run: |
@@ -58,22 +54,29 @@ jobs:
5854
token: ${{ steps.app-token.outputs.token }}
5955
commit-message: 'Post-release version bump [ci skip]'
6056

61-
upload-artifacts:
57+
draft:
6258
needs:
6359
- build
6460
- bump-version
6561

6662
runs-on: ubuntu-latest
6763

68-
permissions:
69-
contents: write
70-
7164
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+
7272
- uses: actions/download-artifact@v4
7373
with:
7474
name: pack
7575

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

Comments
 (0)