diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml new file mode 100644 index 0000000..a3eb4f6 --- /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/.github/workflows/docs.yml b/.github/workflows/docs.yml index c55d2ea..2342bd6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,9 +1,8 @@ name: Documentation on: - push: - tags: - - '*' + release: + types: [created] jobs: docs: diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 632491e..2329d28 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,9 +1,8 @@ name: PyPI Deployment on: - push: - tags: - - 'v*' + release: + types: [created] jobs: build: diff --git a/.release-it.json b/.release-it.json new file mode 100644 index 0000000..32b402a --- /dev/null +++ b/.release-it.json @@ -0,0 +1,25 @@ +{ + "git": { + "push": true, + "commit": true, + "commitMessage": "chore: version ${version} [skip ci]", + "requireBranch": "main", + "changelog": false, + "tag": true + }, + "github": { + "release": false + }, + "plugins": { + "@j-ulrich/release-it-regex-bumper": { + "in": "crowdin_api/__init__.py", + "out": [ + { + "file": "crowdin_api/__init__.py", + "search": "__version__ = \"\\d+\\.\\d+\\.\\d+\"", + "replace": "__version__ = \"{{versionWithoutPrerelease}}\"" + } + ] + } + } +}