From 2019c2f64e984e7726ea15da9b027040aaed576a Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 25 Oct 2022 22:02:37 -0400 Subject: [PATCH] chore: add auto-canary release for v6 (#5883) --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff735911dfa..1a1fd0e460b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - v6 pull_request: branches: - '**' @@ -249,3 +250,28 @@ jobs: run: npx lerna publish --loglevel=verbose --canary --exact --force-publish --yes env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + publish_canary_version_v6: + name: Publish the next major version code as a canary version + runs-on: ubuntu-latest + needs: [integration_tests, lint_with_build, lint_without_build, unit_tests] + if: github.ref == 'refs/heads/v${major}' + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + registry-url: 'https://registry.npmjs.org' + - name: Build + uses: ./.github/actions/prepare-build + + # Fetch all history for all tags and branches in this job because lerna needs it + - run: | + git fetch --prune --unshallow + + - name: Publish all packages to npm + run: npx lerna publish premajor --loglevel=verbose --canary --exact --force-publish --yes --dist-tag rc-v${major} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}