Skip to content

Commit 6fbb1e1

Browse files
committed
Add pypi upload workflow
1 parent 8264e80 commit 6fbb1e1

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "Publish"
2+
3+
on:
4+
push:
5+
tags:
6+
# Publish on any tag starting with a `v`, e.g., v0.1.0
7+
- v*
8+
jobs:
9+
release-build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v6
16+
17+
- name: "Set up Python"
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version-file: "pyproject.toml"
21+
22+
- name: Build release distributions
23+
run: uv build
24+
25+
- name: Upload distributions
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: release-dists
29+
path: dist/
30+
31+
pypi-publish:
32+
name: upload release to PyPI
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: pypi
36+
url: https://pypi.org/project/aeonlib/
37+
permissions:
38+
# IMPORTANT: this permission is mandatory for Trusted Publishing
39+
id-token: write
40+
steps:
41+
- name: Retrieve release distributions
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: release-dists
45+
path: dist/
46+
47+
- name: Publish package distributions to PyPI
48+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)