fix: recover bump files for release notes and fix git tag push auth (… #137
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: | |
| branches: [main] | |
| concurrency: | |
| group: bumpy-release | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write # required for npm trusted publishing (OIDC) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| # Node.js (npm) is needed for npm publish | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* # newer node needed for OIDC | |
| - run: bun install | |
| # --- You wont need this part --- | |
| # Build first since we use the local built version of bumpy instead of the published one | |
| - run: bun run --filter @varlock/bumpy build | |
| # run bun install again to make the now built CLI available | |
| - run: bun install | |
| # ------------------------------- | |
| # 🐸 Plan first — detects mode and caches the result for ci release | |
| # Outputs: mode (version-pr|publish|nothing), packages (comma-separated), json (full plan) | |
| - id: plan | |
| run: bunx @varlock/bumpy ci plan | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| # Example: conditionally run expensive steps only when publishing | |
| # In your project, this is where you'd put build/compile/test steps | |
| # that are only needed before a publish (not when updating the version PR) | |
| - if: steps.plan.outputs.mode == 'publish' | |
| run: echo "📦 Publish mode — packages to release:" && echo "${{ steps.plan.outputs.packages }}" | |
| # Creates/updates release PR when PRs merge to main, publishes packages when release PR is merged | |
| - run: bunx @varlock/bumpy ci release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }} # <- PAT so that version PR triggers CI |