Skip to content

Commit a05e877

Browse files
committed
feat: Automate GitHub Release creation in CI pipeline
Change release workflow to be triggered by pushing tags instead of manually creating GitHub Releases. The CI pipeline now: 1. Triggered by: git push origin v0.1.0 2. Runs all tests and validations 3. Publishes to PyPI (after manual approval) 4. Automatically creates GitHub Release with packages attached This simplifies the release process - just push a tag and the rest is automated.
1 parent 380934e commit a05e877

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ jobs:
593593
publish:
594594
name: Publish to PyPI (Production)
595595
runs-on: ubuntu-latest
596-
if: github.event_name == 'release' && github.event.action == 'published'
596+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
597597
needs: [lint-and-type-check, test, build, integration-tests, cross-platform-integration]
598598
environment: production
599599

@@ -760,10 +760,19 @@ jobs:
760760
print('This may be normal - check manually at: https://pypi.org/project/aletheia-probe/')
761761
"
762762
763-
- name: Upload packages to GitHub Release
763+
- name: Create GitHub Release and upload packages
764764
uses: softprops/action-gh-release@v1
765765
with:
766766
files: dist/*
767+
generate_release_notes: true
768+
body: |
769+
## Installation
770+
771+
```bash
772+
pip install aletheia-probe
773+
```
774+
775+
See [CHANGELOG](https://github.com/sustainet-guardian/aletheia-probe/blob/main/docs/CHANGELOG.md) for full release notes.
767776
env:
768777
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
769778

docs/RELEASE.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,27 @@ git commit -m "Update CHANGELOG for $(grep version pyproject.toml | cut -d'"' -f
2121
git push origin main
2222
```
2323

24-
### 2. Create GitHub Release (2 minutes)
24+
### 2. Create and Push Tag (1 minute)
2525

2626
```bash
27-
# After CI passes, create tag
27+
# After CI passes, create and push tag
2828
VERSION=$(grep 'version = ' pyproject.toml | cut -d'"' -f2)
2929
git tag -a v$VERSION -m "Release version $VERSION"
3030
git push origin v$VERSION
3131
```
3232

33-
Then create GitHub Release at: https://github.com/sustainet-guardian/aletheia-probe/releases/new
33+
This automatically triggers the release pipeline which will:
34+
- Run all tests and validations
35+
- Publish to PyPI (after manual approval)
36+
- Create GitHub Release with packages attached
3437

35-
### 3. Approve & Verify (5 minutes)
38+
### 3. Approve & Verify (10 minutes)
3639

3740
- Wait for CI checks (~10 min)
38-
- Approve deployment when notified
41+
- Approve deployment when notified (production environment)
42+
- CI automatically creates GitHub Release
3943
- Verify: `pip install aletheia-probe==$VERSION`
44+
- Check release: https://github.com/sustainet-guardian/aletheia-probe/releases
4045

4146
---
4247

0 commit comments

Comments
 (0)