-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c877a12
commit 51d76ef
Showing
2 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Publish latest release to NPM | ||
|
||
env: | ||
node_version: 20.x | ||
package_manager: yarn # or npm | ||
install_command: yarn install # or npm ci | ||
script_command: yarn # or npm run | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | ||
NODE_REGISTRY: 'https://registry.npmjs.org' # setup credentials | ||
|
||
on: | ||
workflow_dispatch: # manual trigger | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
cache: ${{ env.package_manager }} | ||
registry-url: ${{ env.NODE_REGISTRY }} | ||
|
||
- name: Install dependencies | ||
run: ${{ env.install_command }} | ||
|
||
- name: Validate package | ||
run: ${{ env.script_command }} validate | ||
|
||
- name: Build package | ||
run: ${{ env.script_command }} prepack | ||
|
||
- name: Publish package | ||
run: | | ||
${{ env.script_command }} changelogen --publish |
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