v1.1.0 #143
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '18.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' |