Skip to content

Setup repo and support SB10 #21

Setup repo and support SB10

Setup repo and support SB10 #21

Workflow file for this run

name: Release
on:
push:
branches:
- main
pull_request:
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')) ||
(github.event_name == 'pull_request')
strategy:
matrix:
node-version: [22]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Audit dependencies
run: pnpm audit
- name: Create production release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm release
- name: Create canary release
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm release:canary