Skip to content

Release packages

Release packages #799

Workflow file for this run

name: Release packages
on:
workflow_run:
workflows: ['Run tests']
types:
- completed
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
jobs:
release-main:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['18.x']
os: [ubuntu-latest]
if: >
${{ github.ref == 'refs/heads/main' && github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: changesets/action@v1
with:
publish: pnpm release
version: pnpm changeset:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
release-next:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['18.x']
os: [ubuntu-latest]
if: >
${{ github.ref == 'refs/heads/next' && github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}