-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.61 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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