Skip to content

Commit 1c25660

Browse files
committed
Add publish workflow
1 parent 8093467 commit 1c25660

3 files changed

Lines changed: 53 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: publish package
2+
permissions:
3+
contents: read
4+
pull-requests: write
5+
6+
on:
7+
push:
8+
tags:
9+
- "v*"
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Install apt dependencies
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install libcurl4-openssl-dev libssl-dev
19+
- uses: actions/checkout@v4.2.2
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@c7f87aa956e4c323abf06d5dec078e358f6b4d04
23+
with:
24+
# Install a specific version of uv.
25+
version: "0.7.6"
26+
enable-cache: true
27+
28+
- name: "Set up Python"
29+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
30+
with:
31+
python-version-file: ".python-version"
32+
33+
- name: Install the project
34+
run: cd aieng-topic-impl && uv sync --dev
35+
36+
- name: Build package
37+
run: cd aieng-topic-impl && uv build
38+
39+
- name: Publish package
40+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
41+
with:
42+
user: __token__
43+
password: ${{ secrets.PYPI_API_TOKEN }}
44+
packages-dir: aieng-topic-impl/dist/
45+
46+
- name: Create GitHub Release
47+
id: create_release
48+
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
49+
with:
50+
artifacts: "aieng-topic-impl/dist/*"
51+
generateReleaseNotes: true

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ repos:
4646
rev: 1.9.1
4747
hooks:
4848
- id: nbqa-ruff
49-
args: [--fix, --exit-non-zero-on-fix]
49+
args: [--fix, --exit-non-zero-on-fix, --ignore=D100]
5050

5151
ci:
5252
autofix_commit_msg: |

aieng-topic-impl/aieng/topic/impl/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
from aieng.topic.impl.example_impl import example_impl
44

5+
56
__all__ = ["example_impl"]

0 commit comments

Comments
 (0)