From b4508dbaa987edeef598db19e82286eeb724e8f5 Mon Sep 17 00:00:00 2001 From: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:01:08 -0500 Subject: [PATCH 1/3] build: update .releaserc to publish from appropriate branches (#3341) * build: update `.releaserc` to publish from appropriate branches * chore: dry run new semantic release config --- .github/workflows/release.yml | 2 +- .releaserc | 6 +++++- package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1390787c0c..86ab69041f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,4 +35,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_NPM_TOKEN }} - run: npx semantic-release@22 + run: npx semantic-release@22 --dry-run diff --git a/.releaserc b/.releaserc index 2c101b5028..adf6f9c63c 100644 --- a/.releaserc +++ b/.releaserc @@ -1,5 +1,9 @@ { - "branches": ["master", "next"], + "branches": [ + { "name": "release-22.x", "range": "22.x", "channel": "22.x" }, + { "name": "release-23.x", "range": "23.x" }, + { "name": "next", "prerelease": true, "channel": "next" } + ], "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", diff --git a/package.json b/package.json index 9be7168e6b..0289784d0f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "stylelint": "stylelint \"src/**/*.scss\" \"scss/**/*.scss\" \"www/src/**/*.scss\" --config .stylelintrc.json", "lint": "npm run stylelint && eslint --ext .js --ext .jsx --ext .ts --ext .tsx . && npm run lint --workspaces --if-present", "prepublishOnly": "npm run build", - "semantic-release": "semantic-release", + "semantic-release": "semantic-release --dry-run", "snapshot": "jest --updateSnapshot", "start": "npm start --workspace=www", "test": "jest --coverage", From 3a62f9ed29365f4622e7d22bcda1a2cea6b980e8 Mon Sep 17 00:00:00 2001 From: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:55:19 -0500 Subject: [PATCH 2/3] chore: update gh actions workflows for new branching strategy (#3342) --- .github/workflows/lockfileversion-check.yml | 3 ++- .github/workflows/release.yml | 3 ++- .github/workflows/sync-master-alpha.yml | 30 --------------------- 3 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/sync-master-alpha.yml diff --git a/.github/workflows/lockfileversion-check.yml b/.github/workflows/lockfileversion-check.yml index 916dcb40d2..4a3c01197c 100644 --- a/.github/workflows/lockfileversion-check.yml +++ b/.github/workflows/lockfileversion-check.yml @@ -5,7 +5,8 @@ name: Lockfile Version check on: push: branches: - - master + - next + - release-* pull_request: jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86ab69041f..f77c38e3bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,8 @@ name: Release CI on: push: branches: - - master + - next + - release-* jobs: release: name: Release diff --git a/.github/workflows/sync-master-alpha.yml b/.github/workflows/sync-master-alpha.yml deleted file mode 100644 index 36d39e2ece..0000000000 --- a/.github/workflows/sync-master-alpha.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Sync alpha with master -on: - push: - branches: - - master - workflow_dispatch: - -jobs: - sync-branches: - runs-on: ubuntu-latest - name: Syncing branches - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Node - uses: actions/setup-node@v1 - with: - node-version: 18 - - name: Create Pull Request - id: cpr - uses: tretuna/sync-branches@1.4.0 - with: - GITHUB_TOKEN: ${{ secrets.requirements_bot_github_token }} - FROM_BRANCH: master - TO_BRANCH: alpha - - name: Enable Pull Request Automerge - uses: peter-evans/enable-pull-request-automerge@v2 - with: - token: ${{ secrets.requirements_bot_github_token }} - pull-request-number: ${{ steps.cpr.outputs.PULL_REQUEST_NUMBER }} From c6e1eb406a3402ea4dc3e573339ba8d68ea85f8b Mon Sep 17 00:00:00 2001 From: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:28:17 -0500 Subject: [PATCH 3/3] build: update `releaserc` to ensure we have a "release" branch (#3345) Semantic release requires at least 1 branch be configured as "release" (see https://github.com/semantic-release/semantic-release/blob/master/docs/usage/workflow-configuration.md#branches-properties) Before this change we had 2 "maintenance" branches and 1 "pre-release" branch, but no "release" branch. This led to an error https://github.com/openedx/paragon/actions/runs/12286316911/job/34286199225 --- .releaserc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.releaserc b/.releaserc index adf6f9c63c..94b6f78223 100644 --- a/.releaserc +++ b/.releaserc @@ -1,7 +1,7 @@ { "branches": [ { "name": "release-22.x", "range": "22.x", "channel": "22.x" }, - { "name": "release-23.x", "range": "23.x" }, + { "name": "release-23.x" }, { "name": "next", "prerelease": true, "channel": "next" } ], "plugins": [