File tree 3 files changed +13
-2
lines changed
3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 37
37
key : ${{ github.ref }}-${{ github.run_id }}-build
38
38
39
39
- name : Checkout branch ${{ github.ref }}
40
- if : ${{ steps.cache.outputs.cache-hit != 'true' }}
41
40
uses : actions/checkout@v3
42
41
43
42
- name : Build
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ name: Publish - npm Publish and Github Release
6
6
on :
7
7
workflow_call :
8
8
inputs :
9
+ commit-hash :
10
+ description : Commit to checkout
11
+ required : false
12
+ type : string
9
13
tag-name :
10
14
description : Tag name
11
15
required : false
63
67
- name : Checkout branch ${{ github.ref }}
64
68
uses : actions/checkout@v3
65
69
with :
70
+ ref : ${{ inputs.commit-hash || 'main' }}
66
71
fetch-depth : 0
67
72
68
73
- name : Build
Original file line number Diff line number Diff line change 30
30
31
31
outputs :
32
32
tag-name : ${{ steps.push-tag.outputs.tag_name }}
33
+ commit-hash : ${{ steps.push-tag.outputs.commit_hash }}
33
34
34
35
steps :
35
36
- name : Checkout branch ${{ github.ref }}
@@ -80,15 +81,21 @@ jobs:
80
81
git push origin --follow-tags
81
82
82
83
tag_name=$(git describe --abbrev=0 --match 'v*')
84
+ commit_hash=$(git rev-parse HEAD)
83
85
84
- echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT"
86
+ echo "Pushing tag: ${tag_name}"
87
+ echo "Pushing commit: ${commit_hash}"
88
+
89
+ echo "tag_name=${tag_name}" >> "$GITHUB_OUTPUT"
90
+ echo "commit_hash=${commit_hash}" >> "$GITHUB_OUTPUT"
85
91
86
92
publish :
87
93
name : Publish
88
94
needs : release
89
95
uses : ./.github/workflows/publish.yml
90
96
secrets : inherit
91
97
with :
98
+ commit-hash : ${{ needs.release.outputs.commit-hash }}
92
99
tag-name : ${{ inputs.tag-name || needs.release.outputs.tag-name }}
93
100
skip-npm : ${{ inputs.skip-npm }}
94
101
You can’t perform that action at this time.
0 commit comments