Merge Queue - Version Bump #4
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: Merge Queue - Version Bump | |
on: | |
pull_request: | |
branches: [main, canary] | |
merge_group: | |
types: [checks_requested] | |
jobs: | |
version-and-publish: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version-file: "package.json" | |
- name: Setup Node.js for npm | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
- name: Install dependencies | |
run: bun i --frozen-lockfile | |
- name: Run tests (PR only) | |
if: github.event_name == 'pull_request' | |
run: | | |
cd packages/filters | |
bun run test | |
- name: Set up .npmrc for authentication (MQ only) | |
if: github.event_name == 'merge_group' | |
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Build and publish (MQ only) | |
if: github.event_name == 'merge_group' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
cd packages/filters | |
bun run build | |
bun run release:patch:canary --no-git-tag | |
- name: Commit version changes (MQ only) | |
if: github.event_name == 'merge_group' | |
run: | | |
git add packages/filters/package.json | |
git commit -m "chore(filters): bump version to $(cd packages/filters && node -p 'require(\"./package.json\").version')" | |
git push origin HEAD |