Skip to content

Commit

Permalink
Add choice version format
Browse files Browse the repository at this point in the history
  • Loading branch information
grvodolagin committed Dec 21, 2022
1 parent c45b789 commit 95fbbb8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: Publish

on:
workflow_dispatch:
inputs:
name:
type: choice
description: Select version format
options:
- minor
- patch
- major

jobs:
test:
Expand Down Expand Up @@ -44,9 +52,9 @@ jobs:
version: 1.2.2
- run: poetry install

- name: Minor version up
- name: Version up
run: |
make minor_version_up
make "${{ github.event.inputs.name }}_version_up"
- name: Add env
run: |
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ build:
publish:
poetry publish

major_version_up:
poetry version -n -s major

minor_version_up:
poetry version -n -s minor

patch_version_up:
./bump_version.sh
git push origin HEAD:${CI_COMMIT_BRANCH}
git push --tags
poetry version -n -s patch

configure_git:
git config --global user.email ${GITLAB_USER_EMAIL}
Expand Down

0 comments on commit 95fbbb8

Please sign in to comment.