Skip to content

Commit

Permalink
Added releases
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedNasser8 committed Sep 5, 2024
1 parent c274cbd commit c004d64
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,38 @@ jobs:
git commit -m "Bump version to ${{ github.event.inputs.version }}"
git push
- name: Get merged PRs
id: pr_notes
run: |
last_tag = $(git describe --tags --abbrev=0 HEAD^)
if [ -z "$last_tag" ]; then
last_tag=$(git rev-list --max-parents=0 HEAD)
merged_prs=$(git log --oneline --merges --pretty=format:"* %s" $last_tag..HEAD | grep -i 'Merge pull request')
else
merged_prs="No previous tag found, this is the first release"
fi
echo "::set-output name=merged_prs::$merged_prs"
- name: Create tag
run: |
current_version=$( poetry run python -c "import toml; print(toml.load('pyproject.toml')['tool']['poetry']['version'])")
git tag $current_version
git push origin $current_version
echo "::set-output name=version::$current_version"
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.outputs.version }}
release_name: Release ${{ github.event.outputs.version }}
body: |
Added Features:
${{github.events.outputs.merged_prs}}
draft: false
prerelease: false

- name: Build package
run: |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ line-length = 100

[tool.poetry]
name = "osipi"
version = "4.0.0"
version = "0.1.2"
description = "The authorative python package for perfusion MRI"
authors = [ "Luis Torres <[email protected]>", "Steven Sourbron <[email protected]>",]
readme = "README.md"
Expand Down

0 comments on commit c004d64

Please sign in to comment.