Skip to content

Snapshot

Snapshot #80

Workflow file for this run

name: Snapshot
on:
workflow_dispatch:
jobs:
canary:
name: Release snapshot version
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Publish Snapshots
continue-on-error: true
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
snapshot=$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//')
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
pnpm clean
pnpm changeset version --no-git-tag --snapshot $snapshot
pnpm changeset:prepublish
pnpm changeset publish --no-git-tag --snapshot $snapshot --tag $snapshot