-
Notifications
You must be signed in to change notification settings - Fork 30
42 lines (41 loc) · 1.14 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
name: Manually Publish
on: workflow_dispatch
jobs:
info:
name: Check commit
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- id: commit
run: echo "message=${{ github.event.head_commit.message }}" >> $GITHUB_OUTPUT
outputs:
commitMsg: ${{ steps.commit.outputs.message }}
publish:
name: Publish
needs: [info]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
ref: main
- name: Node Install
uses: actions/setup-node@v1
with:
node-version: '18'
- name: Installing Packages
env:
NODE_ENV: development
run: npm ci
- name: Testing Packages
run: npm test
- name: Releasing Packages
env:
NODE_ENV: production
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
run: |-
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
npm run lerna:publish