diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..c1a5ff92 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,41 @@ +name: release-please +on: + push: + branches: + - master + +jobs: + release-please: + runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} + + steps: + - name: Release Please + uses: google-github-actions/release-please-action@v4 + id: release + with: + release-type: node + token: ${{ secrets.GH_TOKEN }} + + publish: + needs: release-please + runs-on: ubuntu-latest + if: ${{ needs.release-please.outputs.release_created }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + registry-url: https://registry.npmjs.org + + - name: Install dependencies + run: yarn + + - name: Publish + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}