Skip to content

Commit 722fc35

Browse files
authored
ci: move to the sync release mode (#341)
Close #8
1 parent 7ce4d10 commit 722fc35

17 files changed

Lines changed: 65 additions & 143 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ jobs:
4242
cache: npm
4343
- name: Install dependencies
4444
run: npm ci
45-
- name: Execute version target on all affected packages and release them
46-
run: npx nx affected --base=latest --target=version --parallel=1 --dryRun
45+
- name: Execute version target
46+
run: npx nx version @code-pushup/cli-source --dryRun
47+
- name: Deploy to NPM
48+
run: npx nx run-many --target=deploy --dry-run
4749
release:
4850
if: |
4951
github.repository == 'code-pushup/cli' && (
@@ -80,10 +82,11 @@ jobs:
8082
- name: Execute version target on all affected packages and release them
8183
env:
8284
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
85+
run: npx nx version @code-pushup/cli-source
86+
- name: Deploy to NPM
87+
env:
88+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8389
# un-exclude packages when they're ready for public release
84-
run: npx nx affected --base=latest --target=version --exclude=plugin-lighthouse,nx-plugin --parallel=1
85-
- name: Tag latest
86-
shell: bash
8790
run: |
88-
git tag -f latest
89-
git push origin latest --force
91+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
92+
npx nx run-many -t=deploy --exclude=plugin-lighthouse,nx-plugin
File renamed without changes.

nx.json

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,6 @@
1818
},
1919
"cache": true
2020
},
21-
"version": {
22-
"executor": "@jscutlery/semver:version",
23-
"options": {
24-
"commitMessageFormat": "release({projectName}): {version} [skip ci]",
25-
"tagPrefix": "{projectName}@",
26-
"preset": "angular",
27-
"postTargets": ["github"],
28-
"push": true
29-
}
30-
},
31-
"github": {
32-
"executor": "@jscutlery/semver:github",
33-
"options": {
34-
"tag": "{tag}",
35-
"notes": "{notes}"
36-
}
37-
},
3821
"e2e": {
3922
"dependsOn": ["^build"]
4023
},
@@ -44,6 +27,14 @@
4427
"options": {
4528
"passWithNoTests": true
4629
}
30+
},
31+
"deploy": {
32+
"dependsOn": ["build"],
33+
"executor": "ngx-deploy-npm:deploy",
34+
"options": {
35+
"access": "public",
36+
"noBuild": true
37+
}
4738
}
4839
},
4940
"namedInputs": {

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"lighthouse": "^11.0.0",
8080
"memfs": "^4.5.0",
8181
"moment": "^2.29.4",
82+
"ngx-deploy-npm": "^7.1.0",
8283
"nx": "17.1.3",
8384
"prettier": "^2.6.2",
8485
"react": "^18.2.0",

packages/cli/CHANGELOG.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/cli/project.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
"command": "node tools/scripts/publish.mjs cli {args.ver} {args.tag}",
2020
"dependsOn": ["build"]
2121
},
22-
"version": {},
23-
"github": {},
2422
"lint": {
2523
"executor": "@nx/linter:eslint",
2624
"outputs": ["{options.outputFile}"],
@@ -64,7 +62,8 @@
6462
"cwd": "examples/react-todos-app"
6563
},
6664
"dependsOn": ["build"]
67-
}
65+
},
66+
"deploy": {}
6867
},
6968
"tags": ["scope:core", "type:app"]
7069
}

packages/core/CHANGELOG.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

packages/core/project.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
"esbuildConfig": "esbuild.config.js"
1616
}
1717
},
18-
"version": {},
19-
"github": {},
2018
"publish": {
2119
"command": "node tools/scripts/publish.mjs core {args.ver} {args.tag}",
2220
"dependsOn": ["build"]
@@ -46,7 +44,8 @@
4644
"config": "packages/core/vite.config.integration.ts",
4745
"reportsDirectory": "../../coverage/core/integration-tests"
4846
}
49-
}
47+
},
48+
"deploy": {}
5049
},
5150
"tags": ["scope:core", "type:feature"]
5251
}

packages/models/CHANGELOG.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)