Release packages #799
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 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 }} |