Skip to content

Commit e5e82cb

Browse files
authored
merge develop to master (#295)
1 parent 24028ae commit e5e82cb

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/ci.yml

+21-1
Original file line numberDiff line numberDiff line change
@@ -120,25 +120,45 @@ jobs:
120120
if: always()
121121

122122
build-publish:
123+
permissions:
124+
contents: write
125+
issues: write
126+
pull-requests: write
123127
runs-on: ubuntu-latest
124128
needs:
125129
- lint
126130
- test
127131
steps:
132+
- name: Generate release bot app token
133+
id: generate_token
134+
uses: actions/create-github-app-token@v1
135+
with:
136+
app-id: ${{ secrets.HIROSYSTEMS_RELEASE_BOT_ID }}
137+
private-key: ${{ secrets.HIROSYSTEMS_RELEASE_BOT_PEM }}
138+
128139
- uses: actions/checkout@v4
129140
with:
130141
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
131142
fetch-depth: 0
132143
persist-credentials: false
133144

145+
- name: Get bot user ID
146+
id: bot-user-id
147+
run: |
148+
echo "user-id=$(gh api "/users/${{ steps.generate_token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
149+
env:
150+
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
151+
134152
- name: Semantic Release
135153
uses: cycjimmy/semantic-release-action@v4
136154
id: semantic
137155
# Only run on non-PR events or only PRs that aren't from forks
138156
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
139157
env:
140-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
158+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
141159
SEMANTIC_RELEASE_PACKAGE: ${{ github.event.repository.name }}
160+
GIT_AUTHOR_EMAIL: "${{ steps.bot-user-id.outputs.user-id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com"
161+
GIT_COMMITTER_EMAIL: "${{ steps.bot-user-id.outputs.user-id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com"
142162
with:
143163
semantic_version: 19
144164
extra_plugins: |

0 commit comments

Comments
 (0)