From 5f1e9b0532ce147b9715219a292f1242742434f2 Mon Sep 17 00:00:00 2001 From: Julien Tanay Date: Sun, 20 Oct 2024 20:32:49 +0200 Subject: [PATCH] ci: add release-please workflow --- .github/workflows/release-please.yml | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..010ad18 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,37 @@ +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + packages: write + +name: Release Please + +jobs: + release-please: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Release-Please + uses: googleapis/release-please-action@v4 + id: release + with: + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} + + - name: Install Node.js + if: ${{ steps.release.outputs.release_created == 'true' }} + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: "npm" + + - name: Build and publish packages + if: ${{ steps.release.outputs.release_created == 'true' }} + run: npm run publish