publish.yml 889 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: "Publish"
  2. on:
  3. push:
  4. branches:
  5. - main
  6. concurrency: ${{ github.workflow }}-${{ github.ref }}
  7. jobs:
  8. publish:
  9. runs-on: ubuntu-latest
  10. strategy:
  11. matrix:
  12. node-version: [18.x]
  13. env:
  14. PR_TITLE: "Create Release"
  15. COMMIT_MSG: "chore: create new release"
  16. steps:
  17. - uses: actions/checkout@v3
  18. - uses: actions/setup-node@v3
  19. with:
  20. node-version: ${{ matrix.node-version }}
  21. - name: Install dependencies
  22. run: npm ci
  23. - name: Build package
  24. run: npm run build
  25. - name: Create Release
  26. uses: changesets/action@v1
  27. id: changesets
  28. with:
  29. publish: npm run publish-package
  30. commit: ${{ env.COMMIT_MSG }}
  31. title: ${{ env.PR_TITLE }}
  32. env:
  33. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  34. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}