Skip to content

Commit

Permalink
update npm release process in actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zeke committed Oct 6, 2023
1 parent f3941d2 commit a67db7f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: npm ci
Expand All @@ -34,15 +35,17 @@ jobs:
- name: Run Tests
run: npm test

- name: Commit changes
- name: Publish to npm
run: npm version minor --force && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Commit changes to git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Build artifacts" || echo "No changes to commit"
git push
# - name: Publish to npm
# run: npx np@latest minor --no-2fa --yolo
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit a67db7f

Please sign in to comment.