chore: release v0.0.4-canary.4 #13
Workflow file for this run
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: {} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| registry-url: "https://registry.npmjs.org" | |
| - run: bun install --frozen-lockfile | |
| - run: npx changelogithub | |
| continue-on-error: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build | |
| run: bun turbo build --filter=./packages/* | |
| - name: Determine npm tag | |
| id: npm_tag | |
| shell: bash | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| if [[ "$TAG" =~ -(alpha|beta|next|rc|canary) ]]; then | |
| NPM_TAG="${BASH_REMATCH[1]}" | |
| else | |
| git fetch origin main | |
| if git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then | |
| NPM_TAG="latest" | |
| else | |
| echo "::error::Stable releases must be on the main branch." | |
| exit 1 | |
| fi | |
| fi | |
| echo "tag=$NPM_TAG" >> "$GITHUB_OUTPUT" | |
| echo "Publishing with npm tag: $NPM_TAG" | |
| - name: Publish to npm | |
| shell: bash | |
| run: | | |
| for package_dir in packages/paykit packages/polar packages/stripe; do | |
| (cd "$package_dir" && bun publish --access public --tag "${{ steps.npm_tag.outputs.tag }}") | |
| done | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true |