release.yml 673 B

1234567891011121314151617181920212223242526272829
  1. name: release
  2. on:
  3. push:
  4. branches: [main]
  5. jobs:
  6. release:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - uses: actions/checkout@v2
  10. - name: Use Node.js
  11. uses: actions/setup-node@v1
  12. with:
  13. node-version: 12.*
  14. - name: Configure committer
  15. run: |
  16. git config --global user.name ${GITHUB_ACTOR}
  17. git config --global user.email ${GITHUB_ACTOR}@users.noreply.github.com
  18. - name: npm install, build, and release
  19. run: |
  20. npm ci
  21. npx standard-version
  22. git push --follow-tags
  23. npm publish
  24. env:
  25. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  26. CI: true