ci(release): use github-app for releases #239
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"on": | |
push: | |
branches: | |
- main | |
name: release | |
jobs: | |
release: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
- run: npm ci | |
- run: npm run build | |
- run: npm install @semantic-release/git | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: 474182 | |
private-key: ${{ secrets.GR2M_SEMANTIC_RELEASE_PRIVATE_KEY }} | |
- run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
- run: >- | |
git push | |
https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
HEAD:refs/heads/v1.x | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |