Publish canary release #22
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: 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 |