From 4abe41f0179d3255e53afa13f83d18638f139f18 Mon Sep 17 00:00:00 2001 From: alessia Date: Wed, 2 Aug 2023 12:14:55 -0400 Subject: [PATCH 1/5] chore: publish releases straight to latest tag --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c0f7a1c6c..026b1d8343 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,7 +57,7 @@ jobs: uses: changesets/action@v1 with: version: npm run changeset-version - publish: npm run changeset-publish -- --tag next + publish: npm run changeset-publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 83e42d8d4c6f82a3f184a872aca7930ed96142ed Mon Sep 17 00:00:00 2001 From: alessia Date: Wed, 2 Aug 2023 12:18:11 -0400 Subject: [PATCH 2/5] chore: uses Changesets GHA to do prerelease to automatically generate GH release --- .github/workflows/prerelease.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 7f67aa23cc..d4992a2779 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -52,13 +52,13 @@ jobs: with: files: ".changeset/pre.json" - - name: Enter alpha prerelease mode + - name: Enter prerelease mode (alpha by default) # If .changeset/pre.json does not exist and we did not recently exit # prerelease mode, enter prerelease mode with tag alpha if: steps.check_files.outputs.files_exists == 'false' && !contains(github.event.head_commit.message, 'Exit prerelease') run: npx changeset pre enter alpha - - name: Create alpha release PR + - name: Create prerelease PR uses: changesets/action@v1 with: version: npm run changeset-version @@ -76,12 +76,18 @@ jobs: path: ".changeset/pre.json" prop_path: "tag" - - name: Run publish + - name: Publish to npm + GitHub id: changesets # Only run publish if we're still in pre mode and the last commit was # via an automatically created Version Packages PR if: steps.check_files.outputs.files_exists == 'true' && startsWith(github.event.head_commit.message, 'Version Packages') - run: npm run changeset-publish + uses: changesets/action@v1 + with: + version: echo "This step should never version" + publish: npm run changeset-publish # by default, this will publish to npm and GitHub + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Send a Slack notification on publish if: steps.changesets.outcome == 'success' From c5de124ced4ab25ffe8b12f6fd93bf9f45e55f5c Mon Sep 17 00:00:00 2001 From: alessia Date: Wed, 2 Aug 2023 12:19:36 -0400 Subject: [PATCH 3/5] chore: revert release.yml changes, save for different PR --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 026b1d8343..3c0f7a1c6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,7 +57,7 @@ jobs: uses: changesets/action@v1 with: version: npm run changeset-version - publish: npm run changeset-publish + publish: npm run changeset-publish -- --tag next env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From e8c244ee60b1f8f92417695051021908ac16e0c8 Mon Sep 17 00:00:00 2001 From: alessia Date: Wed, 2 Aug 2023 12:24:45 -0400 Subject: [PATCH 4/5] chore: publish releases straight to latest tag --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c0f7a1c6c..026b1d8343 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,7 +57,7 @@ jobs: uses: changesets/action@v1 with: version: npm run changeset-version - publish: npm run changeset-publish -- --tag next + publish: npm run changeset-publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From d3abf2639a3dde429fa72da95621d70ccfeac0a7 Mon Sep 17 00:00:00 2001 From: alessia Date: Wed, 2 Aug 2023 12:37:24 -0400 Subject: [PATCH 5/5] chore: publish all prereleases to next tag --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index d4992a2779..693c782a10 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -84,7 +84,7 @@ jobs: uses: changesets/action@v1 with: version: echo "This step should never version" - publish: npm run changeset-publish # by default, this will publish to npm and GitHub + publish: npm run changeset-publish -- --tag next # by default, this will publish to npm and GitHub env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}