From 34abb991f8628670f627513eba13e70ab0d2983b Mon Sep 17 00:00:00 2001 From: Federico Luzzi Date: Tue, 25 Jul 2023 14:31:25 +0100 Subject: [PATCH 1/6] fix: add caching to changeset job and remove publish step --- .github/workflows/release.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f56cfca99..c7c35418c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,22 +7,27 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - changesets: - name: Changesets + changeset: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} steps: - name: Checkout uses: actions/checkout@v3 + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "yarn" - name: Install dependencies run: yarn install --frozen-lockfile - - name: Create release pull request or publish to npm - id: changesets + - name: Create release pull request uses: changesets/action@v1 with: commit: "chore: version packages" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Publish - if: steps.changesets.outputs.hasChangesets == 'true' - run: yarn changeset:publish From 381e2442661887236273892a0658d1b0eba15b12 Mon Sep 17 00:00:00 2001 From: Federico Luzzi Date: Tue, 25 Jul 2023 14:38:01 +0100 Subject: [PATCH 2/6] feat: add changeset check gh action --- .github/workflows/changeset-check.yaml | 20 ++++++++++++++++++++ package.json | 1 + 2 files changed, 21 insertions(+) create mode 100644 .github/workflows/changeset-check.yaml diff --git a/.github/workflows/changeset-check.yaml b/.github/workflows/changeset-check.yaml new file mode 100644 index 000000000..89b36798b --- /dev/null +++ b/.github/workflows/changeset-check.yaml @@ -0,0 +1,20 @@ +name: Changeset check +on: + pull_request: + types: [opened, synchronize, reopened] +jobs: + check: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "yarn" + - name: Check + run: yarn changeset:check diff --git a/package.json b/package.json index 0f8ae52b5..624748ef2 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ ], "scripts": { "changeset:publish": "yarn run build && changeset publish", + "changeset:check": "changeset status --since=main", "build": "turbo run build", "build:frontend-production": "turbo run build:production --filter @carrot-kpi/host-frontend", "build:frontend-staging": "turbo run build:staging --filter @carrot-kpi/host-frontend", From 885a3d22c06abff906ef91a02877ec6d23885516 Mon Sep 17 00:00:00 2001 From: Federico Luzzi Date: Tue, 25 Jul 2023 14:39:38 +0100 Subject: [PATCH 3/6] fix: install deps on changeset check gh action --- .github/workflows/changeset-check.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/changeset-check.yaml b/.github/workflows/changeset-check.yaml index 89b36798b..19b0b66b4 100644 --- a/.github/workflows/changeset-check.yaml +++ b/.github/workflows/changeset-check.yaml @@ -16,5 +16,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: "yarn" + - name: Install dependencies + run: yarn install --frozen-lockfile - name: Check run: yarn changeset:check From 2dad38840adb4d8a9ebc098ebd2dfd86ee74be9d Mon Sep 17 00:00:00 2001 From: Federico Luzzi Date: Tue, 25 Jul 2023 16:11:31 +0100 Subject: [PATCH 4/6] chore: update base branch in changeset config --- .changeset/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/config.json b/.changeset/config.json index 0516021f2..738981e34 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -5,7 +5,7 @@ "fixed": [], "linked": [], "access": "restricted", - "baseBranch": "main", + "baseBranch": "origin/main", "updateInternalDependencies": "patch", "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { "onlyUpdatePeerDependentsWhenOutOfRange": true From 8cef35ec4755d02eb13946990483f1b217a7f986 Mon Sep 17 00:00:00 2001 From: Federico Luzzi Date: Tue, 25 Jul 2023 16:15:13 +0100 Subject: [PATCH 5/6] chore: remove since setting in changeset status command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 624748ef2..a57b7d216 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ ], "scripts": { "changeset:publish": "yarn run build && changeset publish", - "changeset:check": "changeset status --since=main", + "changeset:check": "changeset status", "build": "turbo run build", "build:frontend-production": "turbo run build:production --filter @carrot-kpi/host-frontend", "build:frontend-staging": "turbo run build:staging --filter @carrot-kpi/host-frontend", From 94fd7ad4ab0a6038e2a3fba88cbbdf64434551aa Mon Sep 17 00:00:00 2001 From: Federico Luzzi Date: Tue, 25 Jul 2023 16:19:50 +0100 Subject: [PATCH 6/6] choreL remove changeset check gh action --- .github/workflows/changeset-check.yaml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .github/workflows/changeset-check.yaml diff --git a/.github/workflows/changeset-check.yaml b/.github/workflows/changeset-check.yaml deleted file mode 100644 index 19b0b66b4..000000000 --- a/.github/workflows/changeset-check.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Changeset check -on: - pull_request: - types: [opened, synchronize, reopened] -jobs: - check: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x] - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: "yarn" - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: Check - run: yarn changeset:check