-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (37 loc) · 1 KB
/
publish-to-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
37
38
39
40
41
42
43
44
45
46
47
48
name: Publish to NPM
on:
release:
types: [created]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
publish-npm:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- authorization-agent
- application
- data-model
- utils
- api-messages
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- name: Modify .npmrc
run: echo '//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}' >> .npmrc
- name: Install pnpm
uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpx turbo run build
- name: Create release
working-directory: ./packages/${{ matrix.package }}
run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.DEPLOYMENT_AUTH_TOKEN_NPM }}