File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 8
8
jobs :
9
9
build :
10
10
name : Semantic release
11
- environment : main
12
11
runs-on : ubuntu-latest
13
12
steps :
14
13
- uses : actions/checkout@v4
15
14
with :
16
15
persist-credentials : false
17
16
17
+ - uses : actions/create-github-app-token@v2
18
+ id : app-token
19
+ with :
20
+ app-id : " ${{ secrets.SEMANTIC_RELEASE_APP_ID }}"
21
+ private-key : " ${{ secrets.SEMANTIC_RELEASE_PRIVATE_KEY }}"
22
+
18
23
- name : Semantic release
19
24
id : semantic
20
25
uses : cycjimmy/semantic-release-action@v4
21
26
env :
22
- GH_TOKEN : ${{ secrets.GH_TOKEN }}
23
- HACKAGE_KEY : ${{ secrets.HACKAGE_TOKEN }}
27
+ GITHUB_TOKEN : " ${{ steps.app-token.outputs.token }}"
28
+ HACKAGE_KEY : " ${{ secrets.HACKAGE_TOKEN }}"
24
29
25
30
with :
26
- ci : ${{ github.ref == 'refs/heads/main' }}
31
+ ci : ${{ github.ref == github.event.repository.default_branch }}
27
32
extra_plugins : |
28
33
conventional-changelog-conventionalcommits
29
34
semantic-release-mirror-version
30
35
semantic-release-stack-upload
31
36
32
37
- name : Semantic release output
33
38
run : |
34
- echo ref: ${{ github.ref }}
35
- echo dry_run: ${{ github.ref != 'refs/heads/main' }}
39
+ echo default_branch: ${{ github.event.repository.default_branch }}
40
+ echo ref: ${{ github.ref_name }}
41
+ echo dry_run: ${{ github.ref_name != github.event.repository.default_branch }}
36
42
echo published: ${{ steps.semantic.outputs.new_release_published }}
37
43
echo last_release: ${{ steps.semantic.outputs.last_release_version }}
38
44
echo new_version: ${{ steps.semantic.outputs.new_release_version }}
You can’t perform that action at this time.
0 commit comments