Skip to content

Commit

Permalink
feat: add workflow to bump minor version and create release; refactor…
Browse files Browse the repository at this point in the history
… patch release workflow
  • Loading branch information
MasterLaplace committed Nov 7, 2024
1 parent 3b789be commit 715e4cc
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 25 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/create_minor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Bump Minor Version and Create Release

on:
milestone:
types: closed

permissions:
contents: write

jobs:
create_minor_release:
name: Bump version and create release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Run Version Bump Script
run: |
python3 Scripts/increment_version.py minor
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.GIT_SSH_PRIVATE_KEY }}

- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Push changes
run: |
git add .
git commit -m "chore: bump the Flakkari minor version" || true
git push || true
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: minor

- name: Create a GitHub release
uses: ncipollo/[email protected]
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Flakkari ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
draft: false
prerelease: false
generateReleaseNotes: true
2 changes: 1 addition & 1 deletion .github/workflows/create_patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
contents: write

jobs:
create_release:
create_patch_release:
name: Bump version and create release
runs-on: ubuntu-latest
steps:
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/create_release.yml

This file was deleted.

0 comments on commit 715e4cc

Please sign in to comment.