-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (33 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
38
39
40
41
42
43
name: Package and Publish
on:
release:
types: [published]
jobs:
install-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/configure-nodejs
with:
lookup-only: 'true' # We only want to lookup from the cache - if a hit, this job does nothing
build:
needs: install-deps
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: ./.github/actions/configure-nodejs
- name: Use the Release Tag Version
run: |
npm version from-git --allow-same-version --no-git-tag-version
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: NPM registry authentication
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPMJSORG_PUBLISH_TOKEN }}
- name: Publish with CLI to Code Artifact
run: |
npm publish --access public --ignore-scripts