Skip to content

Commit

Permalink
Add publish workflow (#1)
Browse files Browse the repository at this point in the history
* Add .github/ to npmignore

* Add publish workflow

* Update publish.yml
  • Loading branch information
mclintprojects authored Aug 17, 2024
1 parent 253331a commit 49f3c34
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
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 }}
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
yarn.lock
playground.js
tests/
.github/

0 comments on commit 49f3c34

Please sign in to comment.