Snapshot #55
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: Snapshot | |
on: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
snapshot: | |
name: Release snapshot version | |
permissions: | |
contents: write | |
id-token: write | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Publish Snapshots | |
continue-on-error: false | |
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" | |
yarn run changeset version --no-git-tag --snapshot $snapshot | |
yarn run changeset:prepublish | |
yarn run changeset publish --no-git-tag --snapshot $snapshot --tag $snapshot |