From 87744458afac4375e1b7528f55f3c97b727855c6 Mon Sep 17 00:00:00 2001 From: Walheimat Date: Sat, 27 Jan 2024 15:03:24 +0100 Subject: [PATCH] feat(ci): add exec to update version in files --- .github/workflows/generate.yaml | 2 +- .releaserc | 9 +++++- package-lock.json | 52 +++++++++++++++++++++++++++++++++ package.json | 1 + 4 files changed, 62 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate.yaml b/.github/workflows/generate.yaml index 24bfa9d..8f09b5b 100644 --- a/.github/workflows/generate.yaml +++ b/.github/workflows/generate.yaml @@ -23,7 +23,7 @@ jobs: - name: "Install dependencies" run: npm ci - - name: Generate changelog + - name: Create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: npx semantic-release diff --git a/.releaserc b/.releaserc index 1171c53..34962b3 100644 --- a/.releaserc +++ b/.releaserc @@ -17,6 +17,13 @@ ] }, ], - "@semantic-release/changelog" + "@semantic-release/changelog", + "@semantic-release/git", + [ + "@semantic-release/exec", + { + "publishCmd": "make update-next-version NEXT_PACKAGE_VERSION=${nextRelease.version}" + } + ] ] } diff --git a/package-lock.json b/package-lock.json index a6cb5de..92a6501 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "@commitlint/cli": "^18.4.2", "@semantic-release/changelog": "^6.0.3", "@semantic-release/commit-analyzer": "^11.1.0", + "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", "conventional-changelog-conventionalcommits": "^7.0.2", "husky": "^8.0.3", @@ -715,6 +716,57 @@ "node": ">=18" } }, + "node_modules/@semantic-release/exec": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@semantic-release/exec/-/exec-6.0.3.tgz", + "integrity": "sha512-bxAq8vLOw76aV89vxxICecEa8jfaWwYITw6X74zzlO0mc/Bgieqx9kBRz9z96pHectiTAtsCwsQcUyLYWnp3VQ==", + "dev": true, + "dependencies": { + "@semantic-release/error": "^3.0.0", + "aggregate-error": "^3.0.0", + "debug": "^4.0.0", + "execa": "^5.0.0", + "lodash": "^4.17.4", + "parse-json": "^5.0.0" + }, + "engines": { + "node": ">=14.17" + }, + "peerDependencies": { + "semantic-release": ">=18.0.0" + } + }, + "node_modules/@semantic-release/exec/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/exec/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/exec/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": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/@semantic-release/git/-/git-10.0.1.tgz", diff --git a/package.json b/package.json index ca8b136..23085a0 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "@commitlint/cli": "^18.4.2", "@semantic-release/changelog": "^6.0.3", "@semantic-release/commit-analyzer": "^11.1.0", + "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", "conventional-changelog-conventionalcommits": "^7.0.2", "husky": "^8.0.3",