forked from vercel/turborepo
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 920 Bytes
/
publish-npm.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
name: Publish npm packages
on:
push:
branches: [main]
jobs:
publish-npm:
# crates/xtask/src/publish.rs:359
if: "startsWith(github.event.head_commit.message, 'chore: release npm packages')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-node
- name: Cache cargo registry
uses: actions/cache@v3
# Don't care the Cargo.lock, just cache it
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: publish-npm-cargo-cache
- name: Build packages
run: pnpx turbo@canary run build:ts
- name: Write NPM_TOKEN
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_ELEVATED }}" > ~/.npmrc
- name: Publish
uses: actions-rs/cargo@v1
with:
command: xtask
args: workspace --publish