refactor(federation): 👽 Update rest of federation code to Worki… #93
This file contains 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: Build & Publish Package | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
# For provenance generation | |
id-token: write | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
environment: NPM Deploy | |
if: contains(github.event.head_commit.message, '[publish') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
registry-url: "https://registry.npmjs.org" | |
- name: Build | |
run: bun install && bun run build | |
- name: Publish Federation to NPM | |
if: contains(github.event.head_commit.message, '(federation)') | |
run: cd federation && npm publish --provenance --tag ${{ contains(github.event.head_commit.message, '[publish nightly]') && 'nightly' || 'latest' }} --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish Federation to JSR | |
if: contains(github.event.head_commit.message, '(federation)') | |
run: cd federation && bunx jsr publish --allow-slow-types --allow-dirty | |
- name: Publish Client to NPM | |
if: contains(github.event.head_commit.message, '(client)') | |
run: cd client && npm publish --provenance --tag ${{ contains(github.event.head_commit.message, '[publish nightly]') && 'nightly' || 'latest' }} --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish Client to JSR | |
if: contains(github.event.head_commit.message, '(client)') | |
run: cd client && bunx jsr publish --allow-slow-types --allow-dirty |