-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from vMReal/npm
build: npm publish action was added
- Loading branch information
Showing
2 changed files
with
33 additions
and
20 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,33 @@ | ||
name: npm | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Verify it's a tag | ||
id: check_tag | ||
run: | | ||
if [[ -z "${GITHUB_REF##*refs/tags/*}" ]]; then | ||
echo "This workflow can only be triggered on a tag." | ||
exit 1 | ||
fi | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- run: npm ci | ||
- run: npm run build | ||
|
||
- run: npm publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.RELEASE_PLEASE_NPM_TOKEN}} |
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