Skip to content

Commit 1dfe256

Browse files
committed
do release action with actions-miku
1 parent 4783b2c commit 1dfe256

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,28 @@ jobs:
2323
issues: read
2424

2525
steps:
26+
- name: Create GitHub App Token
27+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
28+
id: app-token
29+
with:
30+
app-id: ${{ vars.ACTIONS_MIKU_APP_ID }}
31+
private-key: ${{ secrets.ACTIONS_MIKU_PRIVATE_KEY }}
32+
33+
- name: Get GitHub App User ID
34+
id: get-user-id
35+
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
36+
env:
37+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
38+
2639
- name: Checkout Repo
2740
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
41+
with:
42+
token: ${{ steps.app-token.outputs.token }}
43+
44+
- name: Configure Git Identity
45+
run: |
46+
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
47+
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
2848
2949
- name: Setup Node.js and pnpm
3050
uses: ./.github/common/setup-node-pnpm
@@ -35,6 +55,7 @@ jobs:
3555
with:
3656
# This expects you to have a script called release which does a build for your packages and calls changeset publish
3757
publish: pnpm release
58+
setupGitUser: false
3859
env:
39-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
4061
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)