From 9de12e7389107260ca3989aa1ca208681fd92e92 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Fri, 1 Dec 2023 10:04:04 +0100 Subject: [PATCH] chore: create release job --- .github/workflows/release-pr.yml | 4 ++-- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index ddfe200..3d59f4d 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -1,3 +1,5 @@ +name: Release PR + on: push: branches: @@ -7,8 +9,6 @@ permissions: contents: write pull-requests: write -name: release-please - jobs: release-please: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6f15c42 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + pull_request: + types: [closed] + branches: + - master + +jobs: + Release: + name: 🚀 Release + if: github.event.pull_request.merged && startsWith(github.head_ref, 'release-please--branches--main') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: "yarn" + + - name: Install Dependencies + run: yarn install --immutable + + - name: Publish package + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}