Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit 8f81ebb

Browse files
committed
Create a GitHub release on tag push. Minor formatting changes. Centralize pip installs
1 parent b74bb5e commit 8f81ebb

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.github/workflows/pypi_release.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,57 @@
1+
---
2+
# To trigger a package release, create a new tag in the format v.x.x.x with semantic versioning
13
name: PyPi Package Release
24

35
on:
46
push:
57
tags:
8+
# Only run this workflow for tags that start with 'v.' (release tags)
69
- 'v*'
710

811
jobs:
912
pypi_release:
1013
runs-on: ubuntu-latest
1114
steps:
15+
1216
- name: Checkout Code
1317
uses: actions/checkout@v3
18+
1419
- name: Setup Python
1520
uses: actions/setup-python@v4
1621
with:
1722
python-version: "3.11"
1823
cache: pip
24+
1925
- name: Install dependencies
2026
run: |
2127
python -m pip install --upgrade pip
2228
pip install -r requirements/requirements.txt
23-
- name: Build
29+
pip install wheel twine
30+
31+
- name: Build the package
2432
run: |
25-
pip install wheel
2633
python setup.py sdist bdist_wheel
34+
2735
- name: Smoke Test
2836
run: |
2937
pip install dist/*.whl
3038
aicodebot version
31-
- name: Publish
39+
40+
- name: Publish to PyPi
3241
env:
3342
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
3443
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
3544
run: |
36-
pip install twine
3745
twine check dist/*
3846
twine upload dist/*
47+
48+
- name: Create Github Release
49+
id: create_release
50+
uses: actions/create-release@v1
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
with:
54+
tag_name: ${{ github.ref }}
55+
release_name: Release ${{ github.ref }}
56+
draft: false
57+
prerelease: false

0 commit comments

Comments
 (0)