Skip to content

Release

Release #38

Workflow file for this run

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
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_EMAIL: materialgithubbot@gmail.com
GIT_AUTHOR_NAME: release-bot
GIT_COMMITTER_EMAIL: materialgithubbot@gmail.com
GIT_COMMITTER_NAME: release-bot
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm release
sync-beta:
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
sync-alpha:
runs-on: ubuntu-latest
needs: release
if: startsWith(github.ref, 'refs/heads/alpha')
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 alpha
git push -f