Release #6
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: Release | |
on: workflow_dispatch | |
permissions: | |
contents: write | |
jobs: | |
release: | |
permissions: | |
contents: write | |
id-token: write | |
issues: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Using pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9.3.0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Check and fix vulnerabilities | |
run: pnpm audit --fix | |
- name: Build | |
run: pnpm build:lib | |
- name: Publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_AUTHOR_NAME: release-bot | |
GIT_COMMITTER_NAME: release-bot | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: pnpm release | |
sync: | |
runs-on: ubuntu-latest | |
needs: release | |
if: startsWith(github.ref, 'refs/heads/beta') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Sync | |
env: | |
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git checkout main | |
git pull --rebase origin beta | |
git push -f |