Skip to content

Publish canary release #22

Publish canary release

Publish canary release #22

name: Publish canary release
on:
workflow_dispatch:
# push:
# branches: [canary]
# paths: ['packages/filters/**']
jobs:
publish-canary:
permissions:
contents: write
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: Set up .npmrc for authentication
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build and publish
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
run: |
NEXT_VERSION="v$(cat packages/filters/package.json | jq ".version" -r)"
git add packages/filters/package.json
git commit --amend --no-edit --no-verify
git tag $NEXT_VERSION
git push origin HEAD --force-with-lease --no-verify
git push origin $NEXT_VERSION --no-verify