Skip to content

Commit 7972952

Browse files
committed
Improve workflow
1 parent 72aa5ee commit 7972952

3 files changed

Lines changed: 25 additions & 41 deletions

File tree

.github/workflows/publish.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ on:
77
paths: [ 'pyproject.toml' ]
88

99
jobs:
10+
ci:
11+
uses: ./.github/workflows/ci.yml
1012
check-version:
13+
needs: ci
1114
runs-on: ubuntu-latest
1215
outputs:
1316
version: ${{ steps.version.outputs.version }}
@@ -55,17 +58,27 @@ jobs:
5558
git push origin ${{ needs.check-version.outputs.version }}
5659
5760
- name: Create GitHub Release
58-
uses: actions/create-release@v1
61+
run: |
62+
gh release create ${{ needs.check-version.outputs.version }} \
63+
--title "${{ needs.check-version.outputs.version }}" \
64+
--notes "Release ${{ needs.check-version.outputs.version }}
65+
66+
Auto-generated release from version bump in pyproject.toml"
5967
env:
6068
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
70+
- name: Set up Python for publishing
71+
uses: actions/setup-python@v5
72+
with:
73+
python-version: '3.11'
74+
75+
- name: Install uv
76+
uses: astral-sh/setup-uv@v3
77+
78+
- name: Build package
79+
run: uv build
80+
81+
- name: Publish to PyPI
82+
uses: pypa/gh-action-pypi-publish@release/v1
6183
with:
62-
tag_name: ${{ needs.check-version.outputs.version }}
63-
release_name: ${{ needs.check-version.outputs.version }}
64-
draft: false
65-
prerelease: false
66-
body: |
67-
Release ${{ needs.check-version.outputs.version }}
68-
69-
Auto-generated release from version bump in pyproject.toml
70-
71-
See [CHANGELOG](https://github.com/${{ github.repository }}/compare/${{ needs.check-version.outputs.version }}...HEAD) for details.
84+
password: ${{ secrets.PYPI_API_TOKEN }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "cocapi"
3-
version = "2.2.1"
3+
version = "2.2.2"
44
description = "A python wrapper around clash of clans api"
55
authors = [{name = "Tony Benoy", email = "me@tonybenoy.com"}]
66
license = {text = "GPL-3.0"}

0 commit comments

Comments
 (0)