Skip to content

Commit

Permalink
Merge pull request #14 from provectus/fix_pipeline
Browse files Browse the repository at this point in the history
Fix push to git
  • Loading branch information
grvodolagin authored Dec 23, 2022
2 parents cc688dd + 95fbbb8 commit 8b06065
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
27 changes: 18 additions & 9 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 All @@ -70,11 +78,12 @@ jobs:
run: |
poetry config pypi-token.pypi "${{ secrets.PYPI_PASSWORD }}"
make publish
- name: Git push
uses: github-actions-x/commit@v2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'main'
commit-message: '[skip ci] Version updated to ${{env.PROJECT_VERSION}}'
files: pyproject.toml
run: |
git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/provectus/mlops-utilities.git
git config --global user.name "github-actions"
git add pyproject.toml
git commit -m '[skip ci] Version updated to ${{env.PROJECT_VERSION}}'
git push -u origin HEAD:${{ github.ref }}
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 8b06065

Please sign in to comment.