This pipeline helps to create a release triggered on a tag creation. To create a release:
git checkout main # based on latest main
git pull # be sure that it is up-to-date
git tag v1.2.3 # random version for an example
git push origin v1.2.3 # it triggers the pipeline and new release will be created
Add gpg support
Official documentation recommends to verify PGP signature before using ktlint. This verification has been added on an installation step using curl.
Add brew support
This script gives precedence to brew in case this script is running on a machine where brew tool is installed, otherwise it downloads ktlint with curl as it was before. In a future would be good to add additional tools support such as apt, snap, etc. to avoid manual PGP signature verification.
Add pre-commit.ci support
Very nice feature provided by pre-commit developers - separate CI system to run pre-commit checks: https://pre-commit.ci/
Highly recommend it as it reduces manual work on running these checks manually using GHA. To configure it:
Click on "Sign In With GitHub" and sign in with shoru-sssssaaaaaa account.
Click on shoru-sssssaaaaaa on a next screen.
Click on "manage repos on GitHub" on a next screen.
In "Repository Access" section you can choose one of the following options:
"All repositories"
"Only select repositories" and choose pre-commit-ktlint from the list
Once you done this you will see in pre-commit.ci dashboard all your runnings. Also, this verification will be run on each PR. Once you merge this PR to main then you will see pre-commit.ci badge as green in README file.
Other
Add .idea to .gitignore.
Improve pre-commit config:
Bump versions to the latest ones.
Remove pre-commit-autoupdate as pre-commit.ci will create PRs automatically on each new version. So, we do not need to do that manually.
Split hooks on commit and push triggers to make development faster.
Change markdownlint hook to more stable one.
Add yamllint hook.
Rename ktlint everywhere to make it lowercase (as tool name is).
Improve documentation by adding additional information.
Fix bash script by renaming some variables and removing unused variables.
Changelog
Add "Create release" pipeline
This pipeline helps to create a release triggered on a tag creation. To create a release:
Add
gpg
supportOfficial documentation recommends to verify PGP signature before using
ktlint
. This verification has been added on an installation step usingcurl
.Add
brew
supportThis script gives precedence to
brew
in case this script is running on a machine wherebrew
tool is installed, otherwise it downloadsktlint
withcurl
as it was before. In a future would be good to add additional tools support such asapt
,snap
, etc. to avoid manual PGP signature verification.Add
pre-commit.ci
supportVery nice feature provided by
pre-commit
developers - separate CI system to runpre-commit
checks: https://pre-commit.ci/Highly recommend it as it reduces manual work on running these checks manually using GHA. To configure it:
shoru-sssssaaaaaa
account.shoru-sssssaaaaaa
on a next screen.pre-commit-ktlint
from the listOnce you done this you will see in pre-commit.ci dashboard all your runnings. Also, this verification will be run on each PR. Once you merge this PR to
main
then you will see pre-commit.ci badge as green in README file.Other
.idea
to .gitignore
.pre-commit
config:pre-commit-autoupdate
aspre-commit.ci
will create PRs automatically on each new version. So, we do not need to do that manually.commit
andpush
triggers to make development faster.markdownlint
hook to more stable one.yamllint
hook.ktlint
everywhere to make it lowercase (as tool name is).