release: 5.0.0 #20
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
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
- canary | |
jobs: | |
release: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Install | |
uses: ./.github/composite-actions/install | |
- name: Publish | |
run: pnpm semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_PAT }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} | |
GIT_AUTHOR_NAME: ${{ secrets.RELEASE_BOT_NAME }} | |
GIT_AUTHOR_EMAIL: ${{ secrets.RELEASE_BOT_EMAIL }} | |
GIT_COMMITTER_NAME: ${{ secrets.RELEASE_BOT_NAME }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.RELEASE_BOT_EMAIL }} | |
update-canary: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: [release] | |
name: Update canary | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: 'canary' | |
token: ${{ secrets.RELEASE_BOT_PAT }} | |
- name: Back-merge main into canary | |
run: | | |
git merge --ff-only origin/main | |
git push |