From 757a22a5890c633673a32bf0f35bbd102c0c6f00 Mon Sep 17 00:00:00 2001 From: "David L. Day" Date: Mon, 26 Feb 2024 07:43:57 -0500 Subject: [PATCH 1/5] ci: add commitizen configuration --- .cz.toml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .cz.toml diff --git a/.cz.toml b/.cz.toml new file mode 100644 index 00000000..6296c1f3 --- /dev/null +++ b/.cz.toml @@ -0,0 +1,7 @@ +[tool.commitizen] +name = "cz_conventional_commits" +tag_format = "v$version" +version_scheme = "semver" +version_provider = "npm" +update_changelog_on_bump = true +major_version_zero = true From c969a9721159908489d32de05827c8217fa4adc4 Mon Sep 17 00:00:00 2001 From: "David L. Day" Date: Mon, 26 Feb 2024 07:44:12 -0500 Subject: [PATCH 2/5] doc: convert changelog to commitizen format --- CHANGELOG.md | 67 +++++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d36971a..92b36fb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,4 @@ -# Change Log - -All notable changes to the “languagetool-linter” extension will be documented in -this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to -[Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -Changes not yet released. - -## [0.20.0] - 2023-04-02 +## v0.20.0 (2023-04-02) - Premium Support by Adding Settings for username and apiKey (#438) - thank you (@thomaskrause)[https://github.com/thomaskrause], @@ -20,7 +7,7 @@ Changes not yet released. markdown, where inline comments are allowed (e.g. pandoc) - thank you (@steven-r)[https://github.com/steven-r]! -## [0.19.0] - 2021-11-23 +## v0.19.0 (2021-11-23) ## Changed @@ -30,7 +17,7 @@ Changes not yet released. - dependency updates -## [0.18.0] - 2021-04-02 +## v0.18.0 (2021-04-02) ### Fixed @@ -50,7 +37,7 @@ Changes not yet released. - Moved test fixtures to root of repo. - Renamed src files to match class names. -## [0.17.0] - 2021-01-16 +## v0.17.0 (2021-01-16) ### Fixed @@ -59,7 +46,7 @@ Changes not yet released. - Smart format command and on save handles apostrophes correctly ([216](https://github.com/davidlday/vscode-languagetool-linter/issues/216)) -## [0.16.0] - 2020-11-08 +## v0.16.0 (2020-11-08) ### Added @@ -79,7 +66,7 @@ Changes not yet released. - Converted from `tslint` to `eslint` [#149](https://github.com/davidlday/vscode-languagetool-linter/issues/149). -## [0.15.0] - 2020-06-21 +## v0.15.0 (2020-06-21) ### Added @@ -107,7 +94,7 @@ Changes not yet released. - npm audit fix -## [0.14.0] - 2020-05-09 +## v0.14.0 (2020-05-09) ### Fixed @@ -115,20 +102,20 @@ Changes not yet released. diagnostic highlighting [#132](https://github.com/davidlday/vscode-languagetool-linter/issues/132) -## [0.13.0] - 2020-05-08 +## v0.13.0 (2020-05-08) ### Fixed - Keyboard shortcuts and light bulb now working on LanguageTool problems [#120](https://github.com/davidlday/vscode-languagetool-linter/issues/120) -## [0.12.1] - 2020-05-07 +## v0.12.1 (2020-05-07) ### Changed - Testing release via GitHub Actions -## [0.12.0] - 2020-01-26 +## v0.12.0 (2020-01-26) ### Changed @@ -136,7 +123,7 @@ Changes not yet released. - Ignored Word Configuration items specified as strings - Refactored constants and configuration manager -## [0.11.0] - 2020-01-11 +## v0.11.0 (2020-01-11) ### Fixed @@ -168,7 +155,7 @@ Changes not yet released. - Minimum and maximum port settings for the managed service [#78](https://github.com/davidlday/vscode-languagetool-linter/issues/78) -## [0.10.0] - 2019-12-07 +## v0.10.0 (2019-12-07) ### Fixed @@ -181,7 +168,7 @@ Changes not yet released. - Auto Format Enabled renamed to Smart Format on Type since it only formats smart characters -## [0.9.1] - 2019-12-01 +## v0.9.1 (2019-12-01) ### Fixed @@ -192,7 +179,7 @@ Changes not yet released. `PUNCTUATION_PARAGRAPH_END` Errors - Plaintext Annotatedtext produced correctly -## [0.9.0] - 2019-11-29 +## v0.9.0 (2019-11-29) ### Added @@ -202,13 +189,13 @@ Changes not yet released. - Ignored words have an optional hint shown to remove the word from the ignored list. -## [0.8.1] - 2019-11-17 +## v0.8.1 (2019-11-17) ### Fixed - Corrected category on commands. -## [0.8.0] - 2019-11-17 +## v0.8.0 (2019-11-17) ### Added @@ -222,14 +209,14 @@ Changes not yet released. - Deprecated `managed.jarFile` setting in favor of `managed.classPath` to align with how the setting was used. -## [0.7.0] - 2019-11-17 +## v0.7.0 (2019-11-17) ### Deleted - New class path setting. Extension doesn’t activate when published, but all tests pass. -## [0.6.0] - 2019-11-17 +## v0.6.0 (2019-11-17) ### Added @@ -243,7 +230,7 @@ Changes not yet released. - Deprecated `managed.jarFile` setting in favor of `managed.classPath` to align with how the setting was used. -## [0.5.0] - 2019-11-15 +## v0.5.0 (2019-11-15) ### Fixed @@ -255,13 +242,13 @@ Changes not yet released. - Basic tests for extension, configuration manager, and linter. -## [0.4.1] - 2019-11-15 +## v0.4.1 (2019-11-15) ### Removed - All version 0.4.0 changes. Package broke on publication. -## [0.4.0] - 2019-11-15 +## v0.4.0 (2019-11-15) ### Fixed @@ -281,7 +268,7 @@ Changes not yet released. - Deprecated `managed.jarFile` setting in favor of `managed.classPath` to align with how the setting was used. -## [0.3.2] - 2019-11-04 +## v0.3.2 (2019-11-04) ### Fixed @@ -292,14 +279,14 @@ Changes not yet released. - Use regex in `autoFormatCommand` for simplicity. -## [0.3.1] - 2019-10-25 +## v0.3.1 (2019-10-25) ### Fixed - Upgraded http-proxy-agent to 2.2.3. ([npmjs advisory 1184](https://www.npmjs.com/advisories/1184)) -## [0.3.0] - 2019-10-20 +## v0.3.0 (2019-10-20) ### Added @@ -314,7 +301,7 @@ Changes not yet released. - Updated annotatedtext-remark to filter out front matter. -## [0.2.1] - 2019-10-06 +## v0.2.1 (2019-10-06) ### Fixed @@ -324,7 +311,7 @@ Changes not yet released. “file”. See [issue #9](https://github.com/davidlday/vscode-languagetool-linter/issues/9). -## [0.2.0] - 2019-10-05 +## v0.2.0 (2019-10-05) ### Added @@ -345,7 +332,7 @@ Changes not yet released. be working. Still off by default. - Output / errors now sent to “LanguageTool Linter” output channel. -## [0.1.0] - 2019-09-28 +## v0.1.0 (2019-09-28) ### Added From bd20ef96a5201d0aa546e3e878d5e68712a26606 Mon Sep 17 00:00:00 2001 From: "David L. Day" Date: Mon, 26 Feb 2024 07:51:38 -0500 Subject: [PATCH 3/5] ci: add cz bump dry run to ci workflow --- .github/workflows/nodejs-ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/nodejs-ci.yml b/.github/workflows/nodejs-ci.yml index e01bd30c..3453f0fc 100644 --- a/.github/workflows/nodejs-ci.yml +++ b/.github/workflows/nodejs-ci.yml @@ -73,3 +73,21 @@ jobs: name: Test - run: npm run lint name: ESLint + + cz-dry-run: + needs: + - ubuntu-build + - macos-build + - windows-build + name: "Dry run Commitizen bump" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Create bump and changelog + uses: commitizen-tools/commitizen-action@0.20.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + check_consistency: true + dry_run: true From 10148627528bb93e25376b3d72e2c3bdf5c5e0f6 Mon Sep 17 00:00:00 2001 From: "David L. Day" Date: Mon, 26 Feb 2024 08:02:10 -0500 Subject: [PATCH 4/5] ci: add cz bump and release --- .github/workflows/cz-bump-release.yaml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/cz-bump-release.yaml diff --git a/.github/workflows/cz-bump-release.yaml b/.github/workflows/cz-bump-release.yaml new file mode 100644 index 00000000..745bbe8b --- /dev/null +++ b/.github/workflows/cz-bump-release.yaml @@ -0,0 +1,36 @@ +name: Bump Version and Create Release + +on: + push: + branches: + - main + +concurrency: + group: tag-and-release-${{ github.ref }} + cancel-in-progress: true + +jobs: + bump-and-release: + if: "!startsWith(github.event.head_commit.message, 'bump:')" + runs-on: ubuntu-latest + name: "Bump version and create changelog with commitizen" + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + submodules: true + token: "${{ secrets.GITHUB_TOKEN }}" + - name: Create bump and changelog + id: cz + uses: commitizen-tools/commitizen-action@0.20.0 + with: + commit: true + push: true + github_token: ${{ secrets.VERSION_BUMP_TAG_TOKEN }} + changelog_increment_filename: "release-body.md" + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + body_path: "release-body.md" + tag_name: v${{ steps.cz.outputs.version }} From 3279bb9df4973c3411f6c45cb2cd70459e0e88ff Mon Sep 17 00:00:00 2001 From: "David L. Day" Date: Mon, 26 Feb 2024 08:02:27 -0500 Subject: [PATCH 5/5] fix: add concurrency for publish --- .github/workflows/vsce-publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/vsce-publish.yml b/.github/workflows/vsce-publish.yml index 73080abf..7e527bca 100644 --- a/.github/workflows/vsce-publish.yml +++ b/.github/workflows/vsce-publish.yml @@ -1,8 +1,13 @@ name: VSCE Publish on: - release: - types: [created] + push: + tags: + - "v*" + +concurrency: + group: vsce-publish-${{ github.ref }} + cancel-in-progress: true jobs: publish: