From facd4efca3e934ec95ef77c65b873472c8fdd267 Mon Sep 17 00:00:00 2001 From: Andrii Bodnar Date: Tue, 1 Aug 2023 16:06:10 +0300 Subject: [PATCH] ci: automated versioning (#174) --- .github/workflows/bump-version.yml | 19 +++++++++++++++++ .release-it.json | 33 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/bump-version.yml create mode 100644 .release-it.json diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml new file mode 100644 index 000000000..a3eb4f649 --- /dev/null +++ b/.github/workflows/bump-version.yml @@ -0,0 +1,19 @@ +name: Bump version +run-name: Bump ${{ github.event.inputs.version }} version + +on: + workflow_dispatch: + inputs: + version: + type: choice + description: Version + options: + - patch + - minor + - major + +jobs: + version: + permissions: + contents: write + uses: crowdin/.github/.github/workflows/bump-version.yml@main diff --git a/.release-it.json b/.release-it.json new file mode 100644 index 000000000..75238c98a --- /dev/null +++ b/.release-it.json @@ -0,0 +1,33 @@ +{ + "git": { + "push": true, + "commit": true, + "commitMessage": "chore: version ${version} [skip ci]", + "requireBranch": "master", + "changelog": false, + "tag": true + }, + "github": { + "release": false + }, + "plugins": { + "@j-ulrich/release-it-regex-bumper": { + "in": "build.gradle", + "out": [ + { + "file": "README.md", + "search": { + "pattern": "\\d+\\.\\d+\\.\\d+", + "flags": "g" + }, + "replace": "{{versionWithoutPrerelease}}" + }, + { + "file": "build.gradle", + "search": "^version '\\d+\\.\\d+\\.\\d+'", + "replace": "version '{{versionWithoutPrerelease}}'" + } + ] + } + } +}