Skip to content

Commit ceb40bf

Browse files
Automate the publishing process
1 parent 4b76003 commit ceb40bf

3 files changed

Lines changed: 53 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build:
10+
name: Build distribution 📦
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
15+
with:
16+
persist-credentials: false
17+
- name: Set up Python
18+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
19+
with:
20+
python-version: "3.x"
21+
- name: Install pypa/build
22+
run: python3 -m pip install build --user
23+
- name: Build a binary wheel and a source tarball
24+
run: python3 -m build
25+
- name: Store the distribution packages
26+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
27+
with:
28+
name: python-package-distributions
29+
path: dist/
30+
31+
publish-to-pypi:
32+
name: >-
33+
Publish Python 🐍 distribution 📦 to PyPI
34+
needs:
35+
- build
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: pypi
39+
url: https://pypi.org/p/kivy-garden-i18n
40+
permissions:
41+
id-token: write # IMPORTANT: mandatory for trusted publishing
42+
steps:
43+
- name: Download all the dists
44+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
45+
with:
46+
name: python-package-distributions
47+
path: dist/
48+
- name: Publish distribution 📦 to PyPI
49+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ assert label.text == "おはよう"
5353
Pin the minor version.
5454

5555
```
56-
pip install "kivy-garden-i18n>=0.2,<0.3"
56+
pip install "kivy-garden-i18n>=0.3,<0.4"
5757
```
5858

5959
# Tested on

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)