Skip to content

ci: use a GitHub App and repository bypass rules for pushing to prote… #88

ci: use a GitHub App and repository bypass rules for pushing to prote…

ci: use a GitHub App and repository bypass rules for pushing to prote… #88

Workflow file for this run

"on":
push:
branches:
- master
name: release
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.GR2M_SEMANTIC_RELEASE_ID }}
private-key: ${{ secrets.GR2M_SEMANTIC_RELEASE_PRIVATE_KEY }}
github-api-url: "https://github.acme-inc.com/api/v3"
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run build
- run: rm .gitignore
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
git config user.name gr2m-semantic-release[bot]
git config user.email gr2m-semantic-release[bot]@users.noreply.github.com
git add .gitignore dist/
git commit -m "build"
- run: >-
git push -f
https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
HEAD:refs/heads/v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: >-
git push -f
https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
HEAD:refs/heads/v1.x
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}