push.yml 772 B

12345678910111213141516171819202122232425
  1. name: npm-publish
  2. on: create
  3. jobs:
  4. npm-publish:
  5. name: npm-publish
  6. runs-on: ubuntu-latest
  7. if: github.event.ref_type == 'tag'
  8. steps:
  9. - name: Checkout repository
  10. uses: actions/checkout@master
  11. - name: Set up Node.js
  12. uses: actions/setup-node@master
  13. with:
  14. node-version: 10.0.0
  15. - id: publish
  16. name: publish NPM
  17. uses: JS-DevTools/npm-publish@v1
  18. with:
  19. token: ${{ secrets.NPM_AUTH_TOKEN }}
  20. - if: steps.publish.outputs.type != 'none'
  21. run: |
  22. echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"