-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.12 KB
/
publish-package.yml
File metadata and controls
49 lines (38 loc) · 1.12 KB
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
name: Publish NPM Package
on:
workflow_call:
secrets:
npm_token:
required: true
gh_token:
required: true
jobs:
npm-publish:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: 'npm'
- name: install project dependencies
run: yarn install --frozen-lockfile
- name: build project
run: yarn build
- run: git config user.email "scottwestover2006@gmail.com"
- run: git config user.name "@github-ci"
- run: yarn version --patch --message "Bump version to %s"
- run: git push
- run: git push --follow-tags
- name: publish to npm
run: |
npm set //registry.npmjs.org/:_authToken ${{ secrets.npm_token }}
yarn publish:npm
- name: publish to github
run: |
npm config set registry https://npm.pkg.github.com
npm set //npm.pkg.github.com/:_authToken ${{ secrets.gh_token }}
yarn publish:github