-
Notifications
You must be signed in to change notification settings - Fork 8
37 lines (35 loc) · 1.01 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
name: Publish
on:
release:
types: [published]
jobs:
publish:
if: contains('["morganney"]', github.actor)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected]
with:
node-version: '20.11.1'
- name: Install Dependencies
run: npm ci
- name: Save error log
uses: actions/[email protected]
if: ${{ failure() }}
with:
name: npm-debug-log-${{ hashFiles('package-lock.json') }}
path: npm-debug.log
- name: Pack
run: npm pack --pack-destination=packages/tts-react --workspace=tts-react
- name: Lint
run: npm run lint
- name: Test
run: npm test
- name: Push to NPM registry
uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: packages/tts-react
tag: ${{ contains(github.ref, '-') && 'next' || 'latest' }}