Skip to content

Commit 5ae8b80

Browse files
authored
ci: try aggregate git release (#2754)
* ci: try aggregate git release * ci: update version fork
1 parent dde59f8 commit 5ae8b80

9 files changed

Lines changed: 217 additions & 192 deletions

File tree

.changeset/config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
"commit": false,
1010
"fixed": [
1111
[
12+
"@commercetools-applications/*",
1213
"@commercetools-backend/*",
1314
"@commercetools-frontend/*",
14-
"!@commercetools-frontend/codemod"
15+
"@commercetools-local/*",
16+
"@commercetools-website/*"
1517
]
1618
],
1719
"access": "restricted",

.github/workflows/deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Deploying Playground application to Vercel (production)
3030
run: |
31-
yarn workspace playground run deploy --prod --token="${{ secrets.VERCEL_TOKEN_PLAYGROUND }}"
31+
yarn workspace @commercetools-local/playground run deploy --prod --token="${{ secrets.VERCEL_TOKEN_PLAYGROUND }}"
3232
env:
3333
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID_PLAYGROUND }}
3434
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_PLAYGROUND }}

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,24 @@ jobs:
5656
- name: Building packages
5757
run: yarn build
5858

59-
- name: Create Release Pull Request or Publish to npm
59+
- name: Storing release version for changeset
60+
id: release_version
61+
run: echo "::set-output name=value::$(./scripts/print_release_version.sh)"
62+
shell: bash
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
65+
66+
- name: Creating release pull request or publishing release to npm registry
6067
id: changesets
61-
uses: changesets/action@v1.3.0
68+
# uses: changesets/action@v1.3.0
69+
uses: dotansimha/changesets-action@v1.3.3
6270
with:
6371
publish: yarn changeset publish
6472
version: yarn changeset:version-and-format
6573
commit: 'ci(changesets): version packages'
74+
createGithubReleases: aggregate
75+
githubReleaseName: v${{ steps.release_version.outputs.value }}
76+
githubTagName: v${{ steps.release_version.outputs.value }}
6677
env:
6778
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
6879
SKIP_POSTINSTALL_DEV_SETUP: true

application-templates/starter-typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "merchant-center-application-template-starter-typescript",
2+
"name": "@commercetools-applications/merchant-center-template-starter-typescript",
33
"version": "0.3.3",
44
"description": "A starter example in TypeScript for the bare minimum setup to develop a Merchant Center Application",
55
"private": true,

application-templates/starter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "merchant-center-application-template-starter",
2+
"name": "@commercetools-applications/merchant-center-template-starter",
33
"version": "19.5.3",
44
"description": "A starter example for the bare minimum setup to develop a Merchant Center Application",
55
"private": true,

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@
3333
"test:e2e:playground": "cypress run --spec 'cypress/integration/playground/**/*.ts'",
3434
"test:e2e:template-starter": "cypress run --spec 'cypress/integration/template-starter/**/*.ts'",
3535
"vrt:components": "percy exec -- yarn test:visual",
36-
"playground:build": "yarn workspace playground build",
37-
"playground:start": "yarn workspace playground start",
38-
"playground:start:prod:local": "yarn workspace playground start:prod:local",
36+
"playground:build": "yarn workspace @commercetools-local/playground build",
37+
"playground:start": "yarn workspace @commercetools-local/playground start",
38+
"playground:start:prod:local": "yarn workspace @commercetools-local/playground start:prod:local",
3939
"visual-testing-app:start": "yarn workspace @commercetools-local/visual-testing-app start",
4040
"visual-testing-app:build": "yarn workspace @commercetools-local/visual-testing-app build",
4141
"visual-testing-app:preview": "yarn workspace @commercetools-local/visual-testing-app preview",
42-
"template-starter:build": "yarn workspace merchant-center-application-template-starter build",
43-
"template-starter:start": "yarn workspace merchant-center-application-template-starter start",
44-
"template-starter:start:prod:local": "yarn workspace merchant-center-application-template-starter start:prod:local",
45-
"template-starter-typescript:build": "yarn workspace merchant-center-application-template-starter-typescript build",
46-
"template-starter-typescript:start": "yarn workspace merchant-center-application-template-starter-typescript start",
47-
"template-starter-typescript:start:prod:local": "yarn workspace merchant-center-application-template-starter-typescript start:prod:local",
42+
"template-starter:build": "yarn workspace @commercetools-applications/merchant-center-template-starter build",
43+
"template-starter:start": "yarn workspace @commercetools-applications/merchant-center-template-starter start",
44+
"template-starter:start:prod:local": "yarn workspace @commercetools-applications/merchant-center-template-starter start:prod:local",
45+
"template-starter-typescript:build": "yarn workspace @commercetools-applications/merchant-center-template-starter-typescript build",
46+
"template-starter-typescript:start": "yarn workspace @commercetools-applications/merchant-center-template-starter-typescript start",
47+
"template-starter-typescript:start:prod:local": "yarn workspace @commercetools-applications/merchant-center-template-starter-typescript start:prod:local",
4848
"build": "./scripts/build_packages.sh",
4949
"build:watch": "yarn build --watch",
5050
"build:website": "./scripts/build_website.sh",

playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "playground",
2+
"name": "@commercetools-local/playground",
33
"version": "19.5.0",
44
"description": "A playground application to get started developing Merchant Center Applications",
55
"private": true,

scripts/print_release_version.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# Running "changeset version" to know the new release version
6+
yarn changeset version &>/dev/null
7+
8+
release_version=$(node -e "console.log(require('./packages/application-shell/package.json').version)")
9+
10+
git reset --hard &>/dev/null
11+
12+
echo "$release_version"

0 commit comments

Comments
 (0)