Skip to content

Commit 7f3bb0d

Browse files
committed
git commit -m "feat: add example script for THMM"
1 parent 8eba7d8 commit 7f3bb0d

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

.github/workflows/bump-version.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818
with:
19-
fetch-depth: 0 # Required for semantic-release to access full git history
19+
fetch-depth: 0
2020

2121
- name: Set up Python
2222
uses: actions/setup-python@v5
@@ -47,29 +47,3 @@ jobs:
4747
run: |
4848
git pull --ff-only origin main
4949
git push origin main --follow-tags
50-
51-
- name: "Determine version bump type"
52-
run: |
53-
git fetch --tags
54-
# This defaults to a patch type, unless a feature commit was pushed, then set type to minor
55-
LAST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
56-
LAST_COMMIT=$(git log -1 --format='%H')
57-
echo "Last git tag: $LAST_TAG"
58-
echo "Last git commit: $LAST_COMMIT"
59-
echo "Commits:"
60-
git log --no-merges --pretty=oneline $LAST_TAG...$LAST_COMMIT
61-
git log --no-merges --pretty=format:"%s" $LAST_TAG...$LAST_COMMIT | grep -q ^feat: && BUMP_TYPE="minor" || BUMP_TYPE="patch"
62-
echo "Version bump type: $BUMP_TYPE"
63-
echo "BUMP_TYPE=$BUMP_TYPE" >> $GITHUB_ENV
64-
env:
65-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
- name: "Version bump"
67-
run: |
68-
poetry version $BUMP_TYPE
69-
- name: "Push new version"
70-
run: |
71-
git add pyproject.toml
72-
git commit -m "Update version to $(poetry version -s)"
73-
git push origin HEAD:${{ github.event.pull_request.head.ref }}
74-
env:
75-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)