-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add .github/ to npmignore * Add publish workflow * Update publish.yml
- Loading branch information
1 parent
253331a
commit 49f3c34
Showing
2 changed files
with
29 additions
and
0 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,28 @@ | ||
name: Publish NPM Package | ||
on: | ||
push: | ||
branches: main | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node: "20.x" | ||
|
||
- name: Bump package version | ||
run: | | ||
git config --global user.email "${{github.actor}}@users.noreply.github.com" | ||
git config --global user.name "${{github.actor}}" | ||
npm version patch | ||
- name: Push updated package to NPM | ||
run: git push -f && git push --tags -f | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }} | ||
|
||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
yarn.lock | ||
playground.js | ||
tests/ | ||
.github/ |