From 2196e56403ad36762416ea88d7615024f0edc7fb Mon Sep 17 00:00:00 2001 From: Lindsay Morales Date: Tue, 2 Jul 2024 01:12:40 -0600 Subject: [PATCH 1/3] Remove one of the node versions to avoid duplicated runs --- .github/workflows/beta-version.yml | 2 +- .github/workflows/npm-publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/beta-version.yml b/.github/workflows/beta-version.yml index 0fb6da3..fd31263 100644 --- a/.github/workflows/beta-version.yml +++ b/.github/workflows/beta-version.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x] + node-version: [20.x] steps: - name: Checkout repository diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3db398b..ffb9d72 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x] + node-version: [20.x] steps: - name: Checkout repository From b04ec6983d5ec81cdcb42032f82406c7356b9cba Mon Sep 17 00:00:00 2001 From: Lindsay Morales Date: Tue, 2 Jul 2024 01:20:50 -0600 Subject: [PATCH 2/3] Add repo token to avoid protection issue --- .github/workflows/beta-version.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/beta-version.yml b/.github/workflows/beta-version.yml index fd31263..38ecc24 100644 --- a/.github/workflows/beta-version.yml +++ b/.github/workflows/beta-version.yml @@ -16,6 +16,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: master + token: ${{ secrets.REPO_TOKEN }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 From 1dbf73d020f7b58918d5d5850f7ded2e27e42cee Mon Sep 17 00:00:00 2001 From: Lindsay Morales Date: Tue, 2 Jul 2024 01:24:39 -0600 Subject: [PATCH 3/3] Update beta version workflow trigger --- .github/workflows/beta-version.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/beta-version.yml b/.github/workflows/beta-version.yml index 38ecc24..db363a9 100644 --- a/.github/workflows/beta-version.yml +++ b/.github/workflows/beta-version.yml @@ -1,13 +1,14 @@ name: Build beta version on: - push: - branches: - - master + pull_request: + types: + - closed jobs: create-beta-version: runs-on: ubuntu-latest + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master' strategy: matrix: