Skip to content

Commit 95d74c3

Browse files
committed
devops: add github release action
1 parent bce4ba1 commit 95d74c3

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/ci-main-build-test-deploy.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,31 @@ jobs:
7575
with:
7676
user: __token__
7777
password: ${{ secrets.EMD_PYPI_API_TOKEN }}
78+
79+
create-release:
80+
# Create GitHub release when version is updated
81+
if: needs.version-updated.outputs.pyemd_version == 'true'
82+
needs: [version-updated, deploy]
83+
runs-on: ubuntu-latest
84+
permissions:
85+
contents: write
86+
steps:
87+
- uses: actions/checkout@v4
88+
- name: Get version
89+
id: get_version
90+
run: |
91+
VERSION=$(grep -oP '__version__ = "\K[^"]+' PyEMD/__init__.py)
92+
echo "version=$VERSION" >> $GITHUB_OUTPUT
93+
- name: Create GitHub Release
94+
uses: softprops/action-gh-release@v2
95+
with:
96+
tag_name: v${{ steps.get_version.outputs.version }}
97+
name: Release v${{ steps.get_version.outputs.version }}
98+
body: |
99+
## PyEMD v${{ steps.get_version.outputs.version }}
100+
101+
Install via pip:
102+
```bash
103+
pip install EMD-signal==${{ steps.get_version.outputs.version }}
104+
```
105+
generate_release_notes: true

0 commit comments

Comments
 (0)