mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Setup git user in the release script (#686)
* Setup git user in the release script * refactor stuff
This commit is contained in:
@@ -62,8 +62,8 @@ jobs:
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
id: app-token
|
||||
- uses: ./.github/actions/setup-bot-auth
|
||||
id: bot-auth
|
||||
with:
|
||||
client-id: ${{ vars.APP_CLIENT_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
@@ -74,7 +74,8 @@ jobs:
|
||||
id: changesets
|
||||
uses: ./version
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
github-token: ${{ steps.bot-auth.outputs.token }}
|
||||
setup-git-user: false
|
||||
script: pnpm bump
|
||||
|
||||
publish:
|
||||
@@ -87,13 +88,6 @@ jobs:
|
||||
permissions:
|
||||
contents: write # to create release and have it authored by github-actions (changesets/action)
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
id: app-token
|
||||
with:
|
||||
client-id: ${{ vars.APP_CLIENT_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
permission-contents: write # to bypass branch and tag protection rules (release.ts)
|
||||
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
@@ -106,8 +100,15 @@ jobs:
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- uses: ./.github/actions/setup-bot-auth
|
||||
id: bot-auth
|
||||
with:
|
||||
client-id: ${{ vars.APP_CLIENT_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
permission-contents: write # to bypass branch and tag protection rules (release.ts)
|
||||
|
||||
- name: Publish to marketplace
|
||||
uses: ./publish
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
github-token: ${{ steps.bot-auth.outputs.token }}
|
||||
script: pnpm release
|
||||
|
||||
Reference in New Issue
Block a user