-
Notifications
You must be signed in to change notification settings - Fork 72
38 lines (37 loc) · 1.25 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
name: Create and publish npm package
on:
release:
types: [published]
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
if: github.repository == 'trimble-oss/modus-web-components'
defaults:
run:
working-directory: ./stencil-workspace
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
# Setup Node, build, and publish to the npm, and GitHub registries
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Run Stencil build
run: npm run build
- name: Set npm Registry Auth Token
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TRIMBLE_OSS_AUTOMATION_TOKEN }}
- name: Publish npm Package Publicly
run: npm publish
- name: Set GitHub Registry Auth Token
run: npm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
- name: Publish npm Package to GitHub Registry
run: npm publish --access public --ignore-scripts --@trimble-oss:registry='https://npm.pkg.github.com'