Skip to content

Commit

Permalink
Enchanced release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
henrique-coder committed Jan 3, 2025
1 parent 2302a9d commit b8f25b0
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@ jobs:
with:
fetch-depth: 0

- name: 📝 Extract Version
id: version
- name: 📝 Extract Version and Text
id: version_info
run: |
VERSION=$(echo "${{ github.event.head_commit.message }}" | grep -oP 'Bump version to \K[^ ]+')
COMMIT_MSG="${{ github.event.head_commit.message }}"
VERSION=$(echo "$COMMIT_MSG" | grep -oP 'Bump version to \K[^ )]+')
EXTRA_TEXT=$(echo "$COMMIT_MSG" | grep -oP '\(.*\)' | sed 's/[()]//g' || echo "")
echo "Version detected: $VERSION"
echo "Extra text: $EXTRA_TEXT"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "extra_text=$EXTRA_TEXT" >> $GITHUB_OUTPUT
- name: 🏷️ Get Previous Tag
id: previoustag
Expand Down Expand Up @@ -71,8 +77,8 @@ jobs:
- name: 🚀 Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: "🎉 StreamSnapper ${{ steps.version.outputs.version }} - Summary"
tag_name: v${{ steps.version_info.outputs.version }}
name: ${{ steps.version_info.outputs.extra_text != '' && format('🎉 StreamSnapper {0} - {1}', steps.version_info.outputs.version, steps.version_info.outputs.extra_text) || format('🎉 StreamSnapper {0}', steps.version_info.outputs.version) }}
body: |
## 📦 Installation Options
Expand All @@ -83,14 +89,14 @@ jobs:
- 🔄 Merger: `streamsnapper[merger]`
- ✨ All Features: `streamsnapper[all]`
> **Important:** Install using `pip install -U streamsnapper[EXTRA]`.`. Installing without extras won't provide any additional features.
> **Important:** Install using `pip install -U streamsnapper[EXTRA]`. Installing without extras won't provide any additional features.
### 📋 Changelog:
${{ steps.commit_list.outputs.commits }}
### 📊 Compare Changes
[View all changes](https://github.com/henrique-coder/streamsnapper/compare/${{ steps.previoustag.outputs.tag }}...v${{ steps.version.outputs.version }})
[View all changes](https://github.com/henrique-coder/streamsnapper/compare/${{ steps.previoustag.outputs.tag }}...v${{ steps.version_info.outputs.version }})
draft: false
prerelease: false
files: |
Expand Down

0 comments on commit b8f25b0

Please sign in to comment.