From 92d84d03a95ebd33db8adc0a50534be17ee22835 Mon Sep 17 00:00:00 2001 From: Tavian Taylor Date: Tue, 26 Aug 2025 13:24:17 +0100 Subject: [PATCH 1/6] refactor main.yaml --- .github/workflows/main.yml | 48 +++----------------------------------- 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c41db03..5d611512 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,7 +65,7 @@ jobs: path: test-results/ release: name: Release - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' needs: [lint, unit-test, e2e-test] runs-on: ubuntu-latest steps: @@ -88,6 +88,8 @@ jobs: publish: npm run release title: "chore(new-release)" commit: "chore(new-release)" + branch: ${{ github.ref == 'refs/heads/beta' && 'beta' || '' }} + createGithubReleases: ${{ github.ref == 'refs/heads/main' }} env: GITHUB_TOKEN: ${{ secrets.STACKS_TOOLING_GH_RW_PAT }} NPM_TOKEN: ${{ secrets.NPM_API_KEY }} @@ -104,50 +106,6 @@ jobs: This is necessary because the PR is updated by github-actions[bot]. This is a technical user which does not trigger actions workflows on push events. See this GH issue for more details: https://github.com/changesets/action/issues/187 - release-beta: - name: Release Beta - if: github.ref == 'refs/heads/beta' - needs: [lint, unit-test, e2e-test] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: "npm" - - - name: Install dependencies - run: npm ci - - - name: 🚀 Create/Update Release Pull Request or Publish to npm - id: changesets - uses: changesets/action@v1 - with: - version: npm run version - publish: npm run release - title: "chore(new-beta-release)" - commit: "chore(new-beta-release)" - branch: "beta" - createGithubReleases: false - env: - GITHUB_TOKEN: ${{ secrets.STACKS_TOOLING_GH_RW_PAT }} - NPM_TOKEN: ${{ secrets.NPM_API_KEY }} - - - name: Docs on Release Pull Request - # run only if there is a release pull request open - if: steps.changesets.outputs.pullRequestNumber - uses: thollander/actions-comment-pull-request@v3 - with: - comment-tag: "pr-release-docs" - pr-number: ${{ steps.changesets.outputs.pullRequestNumber }} - message: | - To trigger the build for this PR, **close and re-open it**. - This is necessary because the PR is updated by github-actions[bot]. - This is a technical user which does not trigger actions workflows on push events. - See this GH issue for more details: https://github.com/changesets/action/issues/187 - # cancel the jobs if another workflow is kicked off for the same branch concurrency: group: ${{ github.workflow }}-${{ github.ref }} From b4c3ed254679e42187bcae93a198b0be6fc0becb Mon Sep 17 00:00:00 2001 From: Tavian Taylor Date: Tue, 26 Aug 2025 13:28:46 +0100 Subject: [PATCH 2/6] change empty string to null --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d611512..a77b5a29 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,7 +88,7 @@ jobs: publish: npm run release title: "chore(new-release)" commit: "chore(new-release)" - branch: ${{ github.ref == 'refs/heads/beta' && 'beta' || '' }} + branch: ${{ github.ref == 'refs/heads/beta' && 'beta' || null }} createGithubReleases: ${{ github.ref == 'refs/heads/main' }} env: GITHUB_TOKEN: ${{ secrets.STACKS_TOOLING_GH_RW_PAT }} From 34a0458af31c5051c23338a46f88dc46d4800471 Mon Sep 17 00:00:00 2001 From: Tavian Taylor Date: Tue, 26 Aug 2025 14:56:18 +0100 Subject: [PATCH 3/6] update name --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a77b5a29..d2b7f12c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,7 +64,7 @@ jobs: name: playwright-test-results path: test-results/ release: - name: Release + name: ${{ github.ref == 'refs/heads/main' && 'Release' || 'Release Beta'}} if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' needs: [lint, unit-test, e2e-test] runs-on: ubuntu-latest From 59b87d3be8909b739d977ff3837f2af672c5314b Mon Sep 17 00:00:00 2001 From: Tavian Taylor Date: Wed, 27 Aug 2025 09:48:20 +0100 Subject: [PATCH 4/6] refactor: update condition --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2b7f12c..a354bd42 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,7 +64,7 @@ jobs: name: playwright-test-results path: test-results/ release: - name: ${{ github.ref == 'refs/heads/main' && 'Release' || 'Release Beta'}} + name: ${{ github.ref == 'refs/heads/beta' && 'Release Beta' || 'Release' }} if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' needs: [lint, unit-test, e2e-test] runs-on: ubuntu-latest From 2e030d66df2a60bc81cd41ce98c90cbce4ff8184 Mon Sep 17 00:00:00 2001 From: Tavian Taylor Date: Wed, 27 Aug 2025 09:56:38 +0100 Subject: [PATCH 5/6] test change --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a354bd42..7a7521de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,7 +64,7 @@ jobs: name: playwright-test-results path: test-results/ release: - name: ${{ github.ref == 'refs/heads/beta' && 'Release Beta' || 'Release' }} + name: ${{github.ref}} if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' needs: [lint, unit-test, e2e-test] runs-on: ubuntu-latest From 06bb9522afb560cb47471f8bd0e08959d4bd78e2 Mon Sep 17 00:00:00 2001 From: Tavian Taylor Date: Wed, 27 Aug 2025 10:24:40 +0100 Subject: [PATCH 6/6] update name --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a7521de..4ed58abb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,7 +64,7 @@ jobs: name: playwright-test-results path: test-results/ release: - name: ${{github.ref}} + name: Release (latest or beta) if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' needs: [lint, unit-test, e2e-test] runs-on: ubuntu-latest