Skip to content

Commit 663877c

Browse files
committed
Add release action
1 parent d9b7ca5 commit 663877c

2 files changed

Lines changed: 83 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version:
16+
- "3.10"
17+
- "3.11"
18+
- "3.12"
19+
20+
steps:
21+
- name: Check out repository
22+
uses: actions/checkout@v6
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v6
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install dependencies
30+
run: python -m pip install .
31+
32+
- name: Run tests
33+
run: python -m unittest discover -s tests
34+
35+
build:
36+
runs-on: ubuntu-latest
37+
needs: test
38+
39+
steps:
40+
- name: Check out repository
41+
uses: actions/checkout@v6
42+
43+
- name: Set up Python
44+
uses: actions/setup-python@v6
45+
with:
46+
python-version: "3.12"
47+
48+
- name: Install build tool
49+
run: python -m pip install build
50+
51+
- name: Build distributions
52+
run: python -m build
53+
54+
- name: Upload distributions
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: dist
58+
path: dist/
59+
60+
publish:
61+
runs-on: ubuntu-latest
62+
needs: build
63+
permissions:
64+
id-token: write
65+
66+
steps:
67+
- name: Download distributions
68+
uses: actions/download-artifact@v4
69+
with:
70+
name: dist
71+
path: dist/
72+
73+
- name: Publish to PyPI
74+
uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# jenga
22

3-
A minimal Python package for interacting with selected Jenga API endpoints.
4-
5-
Implemented endpoints:
6-
7-
- `account-balance`
8-
- `mini-statement`
3+
A Python package for interacting with selected Jenga API endpoints.
94

105
Implemented features:
116

@@ -201,5 +196,12 @@ PYTHONPATH=src python3 -m jenga.cli account-balance --country-code KE --account-
201196
- Pending endpoints are listed for roadmap visibility only.
202197
- See the [contribution guide](./CONTRIBUTING.md) for development and pull request workflow.
203198

204-
## 7. License
199+
## 7. Releases
200+
201+
- Tagged releases matching `v*` trigger GitHub Actions to test, build, and publish the package to PyPI automatically.
202+
- Example tag: `v0.1.1`
203+
- PyPI trusted publishing must be configured once for this repository before the workflow can publish.
204+
205+
## 8. License
206+
205207
License: [MIT](./LICENSE)

0 commit comments

Comments
 (0)