Skip to content

Commit

Permalink
ci: automate release and publish (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlday authored Feb 26, 2024
2 parents e50ab85 + 3279bb9 commit 6d53916
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 42 deletions.
7 changes: 7 additions & 0 deletions .cz.toml
Original file line number Diff line number Diff line change
@@ -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
36 changes: 36 additions & 0 deletions .github/workflows/cz-bump-release.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
18 changes: 18 additions & 0 deletions .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 7 additions & 2 deletions .github/workflows/vsce-publish.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
67 changes: 27 additions & 40 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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],
Expand All @@ -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

Expand All @@ -30,7 +17,7 @@ Changes not yet released.

- dependency updates

## [0.18.0] - 2021-04-02
## v0.18.0 (2021-04-02)

### Fixed

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -107,36 +94,36 @@ Changes not yet released.

- npm audit fix

## [0.14.0] - 2020-05-09
## v0.14.0 (2020-05-09)

### Fixed

- Backslashes in markdown plus a valid escape character no longer shifting
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

- Output channel no longer forced open on errors
- 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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 6d53916

Please sign in to comment.