Skip to content

Commit

Permalink
Fix/DEI-124 upgrade release workflow to make minor release (#56)
Browse files Browse the repository at this point in the history
* Upgrade release workflow to make minor release

Signed-off-by: CindyvdVries <cindyvdvries@gmail.com>

* bump up minor version from release workflow

* Fix title of release.yml

Signed-off-by: CindyvdVries <cindyvdvries@gmail.com>

* change input variable name to release_type

---------

Signed-off-by: CindyvdVries <cindyvdvries@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mostafa Farrag <moah.farag@gmail.com>
  • Loading branch information
3 people authored Oct 5, 2023
1 parent 4dece98 commit 46aa51a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
# It bumps the pyproject.toml version (major
# Using this version it creates a tag and a release

name: Release major version (create tag and bump poetry version)
name: Release major or minor version (create tag and bump poetry version)

on: workflow_dispatch
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: Choose type of release
default: major
options:
- minor
- major

jobs:
update-packages:
Expand All @@ -22,13 +31,13 @@ jobs:
run: |
git config user.name github-actions
git config user.email github-actions@github.com
poetry version major
poetry version ${{ github.event.inputs.release_type }}
PROJECT_VERSION=$(poetry version --short)
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
sed -i "1 s/.*/version: $PROJECT_VERSION/" template_input.yaml
git add template_input.yaml
git add pyproject.toml
git commit -m "bump up major version from release workflow: version $PROJECT_VERSION"
git commit -m "bump up ${{ github.event.inputs.release_type }} version from release workflow: version $PROJECT_VERSION"
git push
- name: Create Release
uses: actions/create-release@latest
Expand Down

0 comments on commit 46aa51a

Please sign in to comment.