Skip to content

Commit c8c10ad

Browse files
committed
ci: update release workflow
1 parent 1d88a83 commit c8c10ad

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

Diff for: .github/workflows/release.yml

+10-20
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Publish Package
22

33
on:
4-
push:
5-
tags: ["v*.*.*"]
4+
release:
5+
types: [ published ]
6+
tags: ["*.*.*"]
67
paths-ignore:
78
- '**.md'
89
- '**.svg'
@@ -37,12 +38,13 @@ jobs:
3738
python-version: 3.x
3839

3940
- name: Install Dependencies
40-
run: pip install -r requirements.txt
41-
41+
run: |
42+
pip install -r requirements.txt
43+
pip install -r test_requirements.txt
44+
4245
- name: Run Version Verification
4346
run: |
44-
python -c "from config import CONFIG; import os; current_tag = os.getenv('IMAGE_TAG'); assert CONFIG.VERSION == current_tag, 'Version mismatch: Expected {} but got {}'.format(CONFIG.VERSION, current_tag); print('Version matched!')"
45-
47+
python -c "from taskingai import __version__; import os; current_tag = os.getenv('IMAGE_TAG'); assert __version__ == current_tag, 'Version mismatch: Expected {} but got {}'.format(__version__, current_tag); print('Version matched!')"
4648
4749
- name: Install Twine
4850
run: |
@@ -62,17 +64,5 @@ jobs:
6264
- name: Publish Package
6365
run: twine upload dist/*
6466
env:
65-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
66-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
67-
68-
- name: Create Release
69-
uses: actions/create-release@v1
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
with:
73-
tag_name: ${{ env.IMAGE_TAG }}
74-
release_name: Release ${{ env.IMAGE_TAG }}
75-
body: |
76-
This is the release for version ${{ env.IMAGE_TAG }}.
77-
draft: false
78-
prerelease: false
67+
TWINE_USERNAME: __token__
68+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

Diff for: requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ python_dateutil>=2.5.3
44
setuptools>=21.0.0
55
httpx>=0.23.0
66
pydantic>=2.5.0
7-
7+
wheel==0.41.2
88

0 commit comments

Comments
 (0)