Skip to content

Commit

Permalink
ci: move to the sync release mode (#341)
Browse files Browse the repository at this point in the history
Close #8
  • Loading branch information
IKatsuba authored Dec 1, 2023
1 parent 7ce4d10 commit 722fc35
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 143 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ jobs:
cache: npm
- name: Install dependencies
run: npm ci
- name: Execute version target on all affected packages and release them
run: npx nx affected --base=latest --target=version --parallel=1 --dryRun
- name: Execute version target
run: npx nx version @code-pushup/cli-source --dryRun
- name: Deploy to NPM
run: npx nx run-many --target=deploy --dry-run
release:
if: |
github.repository == 'code-pushup/cli' && (
Expand Down Expand Up @@ -80,10 +82,11 @@ jobs:
- name: Execute version target on all affected packages and release them
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: npx nx version @code-pushup/cli-source
- name: Deploy to NPM
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# un-exclude packages when they're ready for public release
run: npx nx affected --base=latest --target=version --exclude=plugin-lighthouse,nx-plugin --parallel=1
- name: Tag latest
shell: bash
run: |
git tag -f latest
git push origin latest --force
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
npx nx run-many -t=deploy --exclude=plugin-lighthouse,nx-plugin
File renamed without changes.
25 changes: 8 additions & 17 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,6 @@
},
"cache": true
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"commitMessageFormat": "release({projectName}): {version} [skip ci]",
"tagPrefix": "{projectName}@",
"preset": "angular",
"postTargets": ["github"],
"push": true
}
},
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "{tag}",
"notes": "{notes}"
}
},
"e2e": {
"dependsOn": ["^build"]
},
Expand All @@ -44,6 +27,14 @@
"options": {
"passWithNoTests": true
}
},
"deploy": {
"dependsOn": ["build"],
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public",
"noBuild": true
}
}
},
"namedInputs": {
Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"lighthouse": "^11.0.0",
"memfs": "^4.5.0",
"moment": "^2.29.4",
"ngx-deploy-npm": "^7.1.0",
"nx": "17.1.3",
"prettier": "^2.6.2",
"react": "^18.2.0",
Expand Down
34 changes: 0 additions & 34 deletions packages/cli/CHANGELOG.md

This file was deleted.

5 changes: 2 additions & 3 deletions packages/cli/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
"command": "node tools/scripts/publish.mjs cli {args.ver} {args.tag}",
"dependsOn": ["build"]
},
"version": {},
"github": {},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
Expand Down Expand Up @@ -64,7 +62,8 @@
"cwd": "examples/react-todos-app"
},
"dependsOn": ["build"]
}
},
"deploy": {}
},
"tags": ["scope:core", "type:app"]
}
33 changes: 0 additions & 33 deletions packages/core/CHANGELOG.md

This file was deleted.

5 changes: 2 additions & 3 deletions packages/core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"esbuildConfig": "esbuild.config.js"
}
},
"version": {},
"github": {},
"publish": {
"command": "node tools/scripts/publish.mjs core {args.ver} {args.tag}",
"dependsOn": ["build"]
Expand Down Expand Up @@ -46,7 +44,8 @@
"config": "packages/core/vite.config.integration.ts",
"reportsDirectory": "../../coverage/core/integration-tests"
}
}
},
"deploy": {}
},
"tags": ["scope:core", "type:feature"]
}
31 changes: 0 additions & 31 deletions packages/models/CHANGELOG.md

This file was deleted.

5 changes: 2 additions & 3 deletions packages/models/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"esbuildConfig": "esbuild.config.js"
}
},
"version": {},
"github": {},
"publish": {
"command": "node tools/scripts/publish.mjs models {args.ver} {args.tag}",
"dependsOn": ["build"]
Expand Down Expand Up @@ -46,7 +44,8 @@
"config": "packages/models/vite.config.integration.ts",
"reportsDirectory": "../../coverage/models/integration-tests"
}
}
},
"deploy": {}
},
"tags": ["scope:shared", "type:util"]
}
5 changes: 2 additions & 3 deletions packages/nx-plugin/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
]
}
},
"version": {},
"github": {},
"exec:init": {
"command": "nx g ./dist/packages/nx-plugin:init",
"dependsOn": ["build"]
Expand Down Expand Up @@ -68,7 +66,8 @@
"config": "packages/nx-plugin/vite.config.integration.ts",
"reportsDirectory": "../../coverage/packages/models/integration-tests"
}
}
},
"deploy": {}
},
"tags": ["scope:tooling", "type:feature"]
}
5 changes: 2 additions & 3 deletions packages/plugin-eslint/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
"esbuildConfig": "esbuild.config.js"
}
},
"version": {},
"github": {},
"publish": {
"command": "node tools/scripts/publish.mjs plugin-eslint {args.ver} {args.tag}",
"dependsOn": ["build"]
Expand Down Expand Up @@ -47,7 +45,8 @@
"config": "packages/plugin-eslint/vite.config.integration.ts",
"reportsDirectory": "../../coverage/plugin-eslint/integration-tests"
}
}
},
"deploy": {}
},
"tags": ["scope:plugin", "type:feature"]
}
Empty file.
5 changes: 2 additions & 3 deletions packages/plugin-lighthouse/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"esbuildConfig": "esbuild.config.js"
}
},
"version": {},
"github": {},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
Expand All @@ -42,7 +40,8 @@
"config": "packages/plugin-lighthouse/vite.config.integration.ts",
"reportsDirectory": "../../coverage/packages/plugin-lighthouse/integration-tests"
}
}
},
"deploy": {}
},
"tags": ["scope:plugin", "type:feature"]
}
5 changes: 2 additions & 3 deletions packages/utils/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"esbuildConfig": "esbuild.config.js"
}
},
"version": {},
"github": {},
"publish": {
"command": "node tools/scripts/publish.mjs utils {args.ver} {args.tag}",
"dependsOn": ["build"]
Expand Down Expand Up @@ -49,7 +47,8 @@
"config": "packages/utils/vite.config.integration.ts",
"reportsDirectory": "../../coverage/utils/integration-tests"
}
}
},
"deploy": {}
},
"tags": ["scope:shared", "type:util"]
}
Loading

0 comments on commit 722fc35

Please sign in to comment.