-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove minor version bump workflow and rename patch workflow to …
…general release workflow
- Loading branch information
1 parent
d2400eb
commit 3ee6ef8
Showing
2 changed files
with
22 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
name: Bump Patch Version | ||
name: Bump Version and Create Release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- master | ||
- main | ||
branches: [master, main] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
create_patch_release: | ||
name: Bump version and create release | ||
bump_version: | ||
name: Bump version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Run Version Bump Script | ||
- name: Calculate bumped version | ||
id: test_tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
dry_run: true | ||
|
||
- name: Run version bump script | ||
run: | | ||
python3 Scripts/increment_version.py patch | ||
python3 Scripts/increment_version.py ${{ steps.test_tag_version.outputs.new_tag }} | ||
- name: Set up Git and Push changes | ||
env: | ||
|
@@ -33,15 +38,21 @@ jobs: | |
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git add . | ||
git commit -m "chore: bump the Flakkari patch version" || true | ||
git commit -m "chore: bump the Flakkari version to ${{ steps.test_tag_version.outputs.new_tag }}" || true | ||
git push || true | ||
create_release: | ||
name: Create release | ||
needs: bump_version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
default_bump: patch | ||
|
||
- name: Create a GitHub release | ||
uses: ncipollo/[email protected] | ||
|