Skip to content

Commit 9838085

Browse files
committed
Automate publishing to PyPI
1 parent a58c172 commit 9838085

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-24.04
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.12"
17+
- name: Install
18+
run: |
19+
pip install pytest
20+
sudo apt-get -qq update
21+
sudo apt-get install ncbi-blast+
22+
pip install -e .
23+
- name: Test
24+
run: |
25+
python -m pytest
26+
deploy:
27+
runs-on: ubuntu-24.04
28+
needs: [test]
29+
permissions:
30+
id-token: write
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Set up Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: '3.12'
37+
cache: pip
38+
cache-dependency-path: '**/pyproject.toml'
39+
- name: Install dependencies
40+
run: |
41+
pip install setuptools wheel build
42+
- name: Build
43+
run: |
44+
python -m build
45+
- name: Publish
46+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)