-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (34 loc) · 1.06 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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish to NPM
on:
release:
types: [created]
jobs:
Publish:
name: Publish Workflow
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Typecheck
run: yarn typecheck
- name: Configure npm for Authentication
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Release
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: sdk