From fa948276365daf923ee6b75b253d5d4df69d1a5c Mon Sep 17 00:00:00 2001 From: Gabe <41127686+Zidious@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:44:46 +0100 Subject: [PATCH 1/2] ci: add `release` branch check to deploy.yml --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8493ca6a..6210b883 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,12 +4,13 @@ on: push: branches: - develop + - release - master jobs: canary: runs-on: ubuntu-latest - if: github.ref_name == 'develop' && github.repository_owner == 'dequelabs' + if: (github.ref_name == 'develop' || github.ref_name == 'release') && github.repository_owner == 'dequelabs' steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 From c8d30c032c583f2b2dee46f7e2ff4c3af4081b46 Mon Sep 17 00:00:00 2001 From: Gabe <41127686+Zidious@users.noreply.github.com> Date: Fri, 13 Oct 2023 19:02:56 +0100 Subject: [PATCH 2/2] use disTag=rc and different job instead of canary release --- .github/workflows/deploy.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6210b883..a3d7d9b4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,7 @@ on: jobs: canary: runs-on: ubuntu-latest - if: (github.ref_name == 'develop' || github.ref_name == 'release') && github.repository_owner == 'dequelabs' + if: github.ref_name == 'develop' && github.repository_owner == 'dequelabs' steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -35,6 +35,33 @@ jobs: --force-publish \ --yes + relase-candidate: + runs-on: ubuntu-latest + if: github.ref_name == 'release' && github.repository_owner == 'dequelabs' + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'npm' + - run: npm ci + # Ensure packages are built + - run: npm run build + # Make sure the working tree is clean + - run: git reset --hard HEAD + - run: npm config set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }} + - run: | + npx lerna publish prepatch \ + --no-verify-access \ + --no-git-tag-version \ + --no-push \ + --canary \ + --dist-tag=rc \ + --exact \ + --preid=$(git rev-parse --short HEAD) \ + --force-publish \ + --yes + production: runs-on: ubuntu-latest if: github.ref_name == 'master' && github.repository_owner == 'dequelabs'