File tree Expand file tree Collapse file tree 2 files changed +28
-5
lines changed Expand file tree Collapse file tree 2 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 38
38
node-version : " latest"
39
39
cache : " npm"
40
40
- name : Get commit ID
41
- id : " commit_id "
42
- run : echo "COMMIT_ID =$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
41
+ id : " commit-id "
42
+ run : echo "id =$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
43
43
- name : Patch package.json
44
44
run : npm pkg set version=$(git rev-parse --short HEAD)
45
45
- name : Install dependencies
@@ -52,12 +52,15 @@ jobs:
52
52
id : " release"
53
53
uses : ncipollo/release-action@v1
54
54
with :
55
- artifacts : " zxing-wasm-${{ steps.commit_id .outputs.commit_id }}.tgz"
55
+ artifacts : " zxing-wasm-${{ steps.commit-id .outputs.id }}.tgz"
56
56
commit : ${{ github.head_ref || github.ref_name }}
57
- tag : ${{ steps.commit_id .outputs.commit_id }}
57
+ tag : ${{ steps.commit-id .outputs.id }}
58
58
allowUpdates : true
59
+ - name : Get PR Number
60
+ id : get-pr-number
61
+ uses : mgaitan/gha-get-pr-number
59
62
- name : Build Finish Dispatch
60
63
uses : peter-evans/repository-dispatch@v2
61
64
with :
62
65
event-type : build-finish
63
- client-payload : ' { "release-url": "${{steps.release.outputs.html_url}}" }'
66
+ client-payload : ' { "release-url": "${{steps.release.outputs.html_url}}/zxing-wasm-${{ steps.commit-id.outputs.id }}.tgz", "pr-number": ${{ steps.get-pr-number.outputs.number }} }'
Original file line number Diff line number Diff line change
1
+ name : Commment PR
2
+
3
+ on :
4
+ repository_dispatch :
5
+ types : [build-finish]
6
+
7
+ permissions :
8
+ pull-requests : write
9
+ contents : write
10
+
11
+ jobs :
12
+ build-finish :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Comment PR
16
+ uses : thollander/actions-comment-pull-request@v2
17
+ with :
18
+ message : ${{github.event.client_payload.release-url}}
19
+ pr_number : ${{github.event.client_payload.pr-number}}
20
+ comment_tag : ci-bot
You can’t perform that action at this time.
0 commit comments