Skip to content

Commit

Permalink
Merge pull request #25 from guanhuaw/feature/bump1
Browse files Browse the repository at this point in the history
Auto version bumping: first test
  • Loading branch information
guanhuaw authored Jul 28, 2024
2 parents 67b9a9b + b252fa4 commit 8f62435
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e .
pip install ruff pytest
pip install ruff pytest python-semantic-release
- name: Lint with Ruff
run: |
Expand All @@ -38,15 +38,19 @@ jobs:
run: |
pytest ./tests/*
- name: Automated Version Bump
if: github.ref == 'refs/heads/master'
uses: phips28/gh-action-bump-version@master
with:
tag-prefix: "v" # or an empty string if you don't want a prefix
filename: "pyproject.toml"
- name: Python Semantic Release
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
semantic-release version
semantic-release publish
- name: Push changes
if: github.ref == 'refs/heads/master'
run: git push && git push --tags
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push && git push --tags

0 comments on commit 8f62435

Please sign in to comment.