ci: publish experimental snapshots from the experimental branch #1
This file contains hidden or 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 Experimental | |
| on: | |
| push: | |
| branches: | |
| - experimental | |
| paths: | |
| - 'packages/experimental/**' | |
| - '.github/workflows/release-experimental.yml' | |
| workflow_dispatch: {} | |
| permissions: {} | |
| concurrency: | |
| group: release-experimental | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm --filter ./packages/experimental build | |
| - name: Stamp snapshot version | |
| working-directory: packages/experimental | |
| run: | | |
| VERSION="0.0.0-experimental.$(git rev-parse --short=8 HEAD)" | |
| npm pkg set version="$VERSION" | |
| echo "Publishing better-call@$VERSION under the 'experimental' dist-tag" | |
| - name: Publish to npm | |
| run: pnpm --filter ./packages/experimental publish --provenance --access public --no-git-checks --tag experimental |