update GH action
This commit is contained in:
@@ -1,30 +1,37 @@
|
||||
name: Publish to npm
|
||||
|
||||
name: Build and upload to NPM
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
group: environment-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write # required to use OIDC
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
- name: install node v22
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
registry-url: https://registry.npmjs.org
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- name: Update npm to latest
|
||||
run: npm install -g npm@latest
|
||||
- name: Check npm version
|
||||
run: npm --version
|
||||
- name: Install NPM
|
||||
run: npm install
|
||||
- name: Compile
|
||||
run: npm run build
|
||||
|
||||
- run: npm install -g npm@latest
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
- name: Publish to NPM registry (OIDC Trusted Publishing)
|
||||
uses: JS-DevTools/npm-publish@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user