From 55021b222b72de84c5d1dc66364ba08d3d33a5a4 Mon Sep 17 00:00:00 2001 From: Carlos Serrano Date: Sat, 3 Feb 2024 08:15:32 +0100 Subject: [PATCH 1/5] chore(no-release): [skip release] sync package.json version to latest release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 867db72..ad11119 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@carpasse/dapi", - "version": "0.1.0", + "version": "1.0.0", "description": "Simple library to create complex systems out of pure functions", "main": "./dist/cjs/index.js", "module": "./dist/cjs/index.mjs", From 73f9edbb025aba09a9702cc38f8c4da01a4f2beb Mon Sep 17 00:00:00 2001 From: Carlos Serrano Date: Sat, 3 Feb 2024 08:16:59 +0100 Subject: [PATCH 2/5] chore(semantic-release): do not create a release on test, build, ci, chore, revert and doc commits --- .releaserc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.releaserc b/.releaserc index 422d1c7..f0892bd 100644 --- a/.releaserc +++ b/.releaserc @@ -8,7 +8,7 @@ { "type": "docs", "scope": "README", - "release": "patch" + "release": false }, { "type": "refactor", @@ -24,23 +24,27 @@ }, { "type": "test", - "release": "patch" + "release": false }, { "type": "build", - "release": "patch" + "release": false }, { "type": "ci", - "release": "patch" + "release": false }, { "type": "chore", - "release": "patch" + "release": false }, { "type": "revert", "release": "patch" + }, + { + "scope": "no-release", + "release": false } ] } From a12044b2ad3c8c23335dd73bfdb02109ec9a150f Mon Sep 17 00:00:00 2001 From: Carlos Serrano Date: Sat, 3 Feb 2024 08:29:00 +0100 Subject: [PATCH 3/5] build(semantic-relase): run release gh action on beta and alpha branches By running the release gh action on beta and alpha branches I expect semantic-release to create pre-releases for every commit I do on those branches with the proper naming convenction --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7faa6b..b38a6bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,8 @@ on: push: branches: - master + - beta + - alpha jobs: release: From 1392f158020c3595dc33a9a6d75ef4033f2440f2 Mon Sep 17 00:00:00 2001 From: Carlos Serrano Date: Sun, 4 Feb 2024 06:43:06 +0100 Subject: [PATCH 4/5] chore: commit package.json and package-lock.json as part fo the release --- .releaserc | 10 ++++ package-lock.json | 117 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 3 files changed, 126 insertions(+), 2 deletions(-) diff --git a/.releaserc b/.releaserc index f0892bd..d71de92 100644 --- a/.releaserc +++ b/.releaserc @@ -56,6 +56,16 @@ } ], "@semantic-release/npm", + [ + "@semantic-release/git", + { + "assets": [ + "package-lock.json", + "package.json" + ], + "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + } + ], "@semantic-release/github" ] } diff --git a/package-lock.json b/package-lock.json index 9ce7b3c..05e72dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,18 @@ { "name": "@carpasse/dapi", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@carpasse/dapi", - "version": "0.1.0", + "version": "1.0.0", "license": "MIT", "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", "@semantic-release/commit-analyzer": "^11.1.0", + "@semantic-release/git": "^10.0.1", "@semantic-release/github": "^9.2.6", "@semantic-release/npm": "^11.0.2", "@semantic-release/release-notes-generator": "^12.1.0", @@ -1525,6 +1526,118 @@ "node": ">=18" } }, + "node_modules/@semantic-release/git": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@semantic-release/git/-/git-10.0.1.tgz", + "integrity": "sha512-eWrx5KguUcU2wUPaO6sfvZI0wPafUKAMNC18aXY4EnNcrZL86dEmpNVnC9uMpGZkmZJ9EfCVJBQx4pV4EMGT1w==", + "dev": true, + "dependencies": { + "@semantic-release/error": "^3.0.0", + "aggregate-error": "^3.0.0", + "debug": "^4.0.0", + "dir-glob": "^3.0.0", + "execa": "^5.0.0", + "lodash": "^4.17.4", + "micromatch": "^4.0.0", + "p-reduce": "^2.0.0" + }, + "engines": { + "node": ">=14.17" + }, + "peerDependencies": { + "semantic-release": ">=18.0.0" + } + }, + "node_modules/@semantic-release/git/node_modules/@semantic-release/error": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-3.0.0.tgz", + "integrity": "sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw==", + "dev": true, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@semantic-release/git/node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@semantic-release/git/node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@semantic-release/git/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/@semantic-release/git/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@semantic-release/git/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/@semantic-release/git/node_modules/p-reduce": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz", + "integrity": "sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@semantic-release/git/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/@semantic-release/github": { "version": "9.2.6", "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-9.2.6.tgz", diff --git a/package.json b/package.json index ad11119..21093c9 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", "@semantic-release/commit-analyzer": "^11.1.0", + "@semantic-release/git": "^10.0.1", "@semantic-release/github": "^9.2.6", "@semantic-release/npm": "^11.0.2", "@semantic-release/release-notes-generator": "^12.1.0", From 6a797b96adfd14adaeb679566fc1e73b419b80cf Mon Sep 17 00:00:00 2001 From: Carlos Serrano Date: Sun, 4 Feb 2024 06:48:59 +0100 Subject: [PATCH 5/5] chore: trigger node validation on master, beta and alpha branches --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3c89fc7..b56f503 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,9 +5,9 @@ name: Node.js CI on: push: - branches: ['master'] + branches: ['master', 'beta', 'alpha'] pull_request: - branches: ['master'] + branches: ['master', 'beta', 'alpha'] jobs: build: