From ffdb5de4a10c08de9a13de7788b51e81fea14dc9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Jun 2021 13:10:32 +0000 Subject: [PATCH 01/14] build(deps): bump glob-parent from 5.1.1 to 5.1.2 Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2. - [Release notes](https://github.com/gulpjs/glob-parent/releases) - [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md) - [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2) --- updated-dependencies: - dependency-name: glob-parent dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ae378d4..3a429d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3464,9 +3464,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" From 9fb9f4047482578206cdf6a0e3e3cedcbedc8e03 Mon Sep 17 00:00:00 2001 From: phips28 Date: Thu, 1 Jul 2021 21:36:19 +0200 Subject: [PATCH 02/14] fix missing required flag --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 8fcfca2..d9da0e1 100644 --- a/action.yml +++ b/action.yml @@ -18,11 +18,14 @@ inputs: major-wording: description: 'Words list that trigger a major version bump' default: 'BREAKING CHANGE,major' + required: false patch-wording: description: 'Words list that trigger a patch version bump' + required: false rc-wording: description: 'Words list that trigger a patch version bump' default: 'pre-alpha,pre-beta,pre-rc' + required: false skip-tag: description: 'Avoid to add a TAG to the version update commit' default: 'false' From 1644893922461d8b7fdb198cfe2f5bccb78bd53d Mon Sep 17 00:00:00 2001 From: Automated Version Bump Date: Thu, 1 Jul 2021 19:37:07 +0000 Subject: [PATCH 03/14] ci: version bump to v8.2.15 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index ae378d4..4f0fd4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.14", + "version": "8.2.15", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e498639..024fcfd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.14", + "version": "8.2.15", "repository": { "type": "git", "url": "git+https://github.com/phips28/gh-action-bump-version.git" From 8aa5fdeced286f77dadc0fdaf1e2569dd0327443 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 19:37:44 +0000 Subject: [PATCH 04/14] build(deps): bump ws from 7.2.3 to 7.5.1 Bumps [ws](https://github.com/websockets/ws) from 7.2.3 to 7.5.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/7.2.3...7.5.1) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4f0fd4a..e7af49a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7932,9 +7932,9 @@ } }, "ws": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", - "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==", + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz", + "integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow==", "dev": true }, "xml-name-validator": { From a70c3c256d93b7a2850cf6fdaf2f3d4552725ba9 Mon Sep 17 00:00:00 2001 From: phips28 Date: Thu, 1 Jul 2021 21:37:56 +0200 Subject: [PATCH 05/14] add example for tag-prefix --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4ce56c6..bdab86d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Make sure you use the `actions/checkout@v2` action! env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag-prefix: '' + tag-prefix: 'v' ``` **skip-tag:** The tag is not added to the git repository (optional). Example: @@ -106,4 +106,4 @@ Make sure you use the `actions/checkout@v2` action! GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: commit-message: 'CI: bumps version to {{version}} [skip ci]' -``` \ No newline at end of file +``` From 261e9bdd0e7edc079653d6bb1b4ea4c2925c4927 Mon Sep 17 00:00:00 2001 From: Automated Version Bump Date: Thu, 1 Jul 2021 19:38:51 +0000 Subject: [PATCH 06/14] ci: version bump to v8.2.16 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4f0fd4a..f46a768 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.15", + "version": "8.2.16", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 024fcfd..a641d77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.15", + "version": "8.2.16", "repository": { "type": "git", "url": "git+https://github.com/phips28/gh-action-bump-version.git" From b8b23f67d51d5523aa9656e42660d05ce07025b8 Mon Sep 17 00:00:00 2001 From: phips28 Date: Thu, 1 Jul 2021 21:53:38 +0200 Subject: [PATCH 07/14] input tag in commit message detection --- .github/workflows/push.yml | 24 ++++++++++++------------ index.js | 9 +++++---- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f6f7800..142b48e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,36 +1,36 @@ -name: "Bump Version" +name: 'Bump Version' on: push: branches: - - "master" + - 'master' jobs: bump-version: - name: "Bump Version on master" + name: 'Bump Version on master' runs-on: ubuntu-latest steps: - - name: "Checkout source code" - uses: "actions/checkout@v2" + - name: 'Checkout source code' + uses: 'actions/checkout@v2' with: ref: ${{ github.ref }} - - name: "cat package.json" + - name: 'cat package.json' run: cat ./package.json - - name: "Setup Node.js" - uses: "actions/setup-node@v1" + - name: 'Setup Node.js' + uses: 'actions/setup-node@v1' with: node-version: 12 - - name: "Automated Version Bump" + - name: 'Automated Version Bump' id: version-bump - uses: "phips28/gh-action-bump-version@master" + uses: 'phips28/gh-action-bump-version@test/tagPrefix' with: tag-prefix: 'v' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: "cat package.json" + - name: 'cat package.json' run: cat ./package.json - - name: 'Output Step' + - name: 'Output Step' env: NEW_TAG: ${{ steps.version-bump.outputs.newTag }} run: echo "new tag $NEW_TAG" diff --git a/index.js b/index.js index 263ece8..da9c457 100644 --- a/index.js +++ b/index.js @@ -16,15 +16,16 @@ Toolkit.run(async (tools) => { console.log("Couldn't find any commits in this event, incrementing patch version..."); } + const tagPrefix = process.env['INPUT_TAG-PREFIX'] || ''; const messages = event.commits ? event.commits.map((commit) => commit.message + '\n' + commit.body) : []; const commitMessage = process.env['INPUT_COMMIT-MESSAGE'] || 'ci: version bump to {{version}}'; console.log('messages:', messages); - const commitMessageRegex = new RegExp(commitMessage.replace(/{{version}}/g, 'v\\d+\\.\\d+\\.\\d+'), 'ig'); + const commitMessageRegex = new RegExp(commitMessage.replace(/{{version}}/g, `${tagPrefix}\\d+\\.\\d+\\.\\d+`), 'ig'); const isVersionBump = messages.find((message) => commitMessageRegex.test(message)) !== undefined; if (isVersionBump) { - tools.exit.success('No action necessary!'); + tools.exit.success('No action necessary because we found a previous bump!'); return; } @@ -112,7 +113,7 @@ Toolkit.run(async (tools) => { await tools.runInWorkspace('npm', ['version', '--allow-same-version=true', '--git-tag-version=false', current]); console.log('current:', current, '/', 'version:', version); let newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim().replace(/^v/, ''); - newVersion = `${process.env['INPUT_TAG-PREFIX']}${newVersion}`; + newVersion = `${tagPrefix}${newVersion}`; await tools.runInWorkspace('git', ['commit', '-a', '-m', commitMessage.replace(/{{version}}/g, newVersion)]); // now go to the actual branch to perform the same versioning @@ -124,7 +125,7 @@ Toolkit.run(async (tools) => { await tools.runInWorkspace('npm', ['version', '--allow-same-version=true', '--git-tag-version=false', current]); console.log('current:', current, '/', 'version:', version); newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim().replace(/^v/, ''); - newVersion = `${process.env['INPUT_TAG-PREFIX']}${newVersion}`; + newVersion = `${tagPrefix}${newVersion}`; console.log(`::set-output name=newTag::${newVersion}`); try { // to support "actions/checkout@v1" From d012ab63198347c55c892ebd5fdc6a6f653c808e Mon Sep 17 00:00:00 2001 From: phips28 Date: Thu, 1 Jul 2021 21:54:24 +0200 Subject: [PATCH 08/14] test/tagPrefix --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 142b48e..eb2429b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: 'Bump Version' on: push: branches: - - 'master' + - 'test/tagPrefix' jobs: bump-version: From aacaac5e0637589834ae09ddcc14298e758018d7 Mon Sep 17 00:00:00 2001 From: Automated Version Bump Date: Thu, 1 Jul 2021 19:55:17 +0000 Subject: [PATCH 09/14] ci: version bump to v8.2.17 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f46a768..bcf16fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.16", + "version": "8.2.17", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a641d77..1d0796c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.16", + "version": "8.2.17", "repository": { "type": "git", "url": "git+https://github.com/phips28/gh-action-bump-version.git" From 278be27ea76c1c9cbe90f236b40b4c0c709b1d25 Mon Sep 17 00:00:00 2001 From: phips28 Date: Thu, 1 Jul 2021 21:58:06 +0200 Subject: [PATCH 10/14] revert to master --- .github/workflows/push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index eb2429b..2244c1c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: 'Bump Version' on: push: branches: - - 'test/tagPrefix' + - 'master' jobs: bump-version: @@ -23,7 +23,7 @@ jobs: node-version: 12 - name: 'Automated Version Bump' id: version-bump - uses: 'phips28/gh-action-bump-version@test/tagPrefix' + uses: 'phips28/gh-action-bump-version@master' with: tag-prefix: 'v' env: From 3fb939e6dd8ed7d0ead1d2f87981164147141335 Mon Sep 17 00:00:00 2001 From: Automated Version Bump Date: Thu, 1 Jul 2021 20:13:39 +0000 Subject: [PATCH 11/14] ci: version bump to v8.2.18 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a990c5..7c97f68 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.17", + "version": "8.2.18", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1d0796c..54bf60f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.17", + "version": "8.2.18", "repository": { "type": "git", "url": "git+https://github.com/phips28/gh-action-bump-version.git" From 01209945681e9dcd33763a24227d7cba9dda7d17 Mon Sep 17 00:00:00 2001 From: Automated Version Bump Date: Thu, 1 Jul 2021 20:14:43 +0000 Subject: [PATCH 12/14] ci: version bump to v8.2.19 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index d662ab3..e771530 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.18", + "version": "8.2.19", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 54bf60f..dc39e95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.18", + "version": "8.2.19", "repository": { "type": "git", "url": "git+https://github.com/phips28/gh-action-bump-version.git" From 52ffa69420ad2629dfc861609ef6422723b15386 Mon Sep 17 00:00:00 2001 From: phips28 Date: Thu, 1 Jul 2021 22:17:34 +0200 Subject: [PATCH 13/14] readme --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d9da0e1..7d874a3 100644 --- a/action.yml +++ b/action.yml @@ -23,7 +23,7 @@ inputs: description: 'Words list that trigger a patch version bump' required: false rc-wording: - description: 'Words list that trigger a patch version bump' + description: 'Words list that trigger a rc version bump' default: 'pre-alpha,pre-beta,pre-rc' required: false skip-tag: From 7cf81ed4ff917de7a6270d5f7c175ec9681180f8 Mon Sep 17 00:00:00 2001 From: Automated Version Bump Date: Thu, 1 Jul 2021 20:18:25 +0000 Subject: [PATCH 14/14] ci: version bump to v8.2.20 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e771530..ef1eed1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.19", + "version": "8.2.20", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index dc39e95..af50d31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gh-action-bump-version", - "version": "8.2.19", + "version": "8.2.20", "repository": { "type": "git", "url": "git+https://github.com/phips28/gh-action-bump-version.git"