Skip to content

Commit 3cd3460

Browse files
committed
Add GitHub workflow for uploading to PyPI
1 parent ed13306 commit 3cd3460

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: "Release"
3+
on: "workflow_dispatch"
4+
jobs:
5+
build:
6+
name: "Build"
7+
runs-on: "ubuntu-22.04"
8+
steps:
9+
- name: "Check out repository"
10+
uses: "actions/checkout@v4"
11+
- name: "Set up Python"
12+
uses: "actions/setup-python@v4"
13+
with:
14+
python-version: "3.9"
15+
- name: "Build distribution packages"
16+
run: make package-check
17+
- name: "Save distribution directory"
18+
uses: "actions/upload-artifact@v3"
19+
with:
20+
name: "distribution"
21+
path: |
22+
dist
23+
upload:
24+
name: "Upload"
25+
needs: "build"
26+
runs-on: "ubuntu-22.04"
27+
environment: "release"
28+
permissions:
29+
id-token: "write"
30+
steps:
31+
- name: "Restore distribution directory"
32+
uses: "actions/download-artifact@v3"
33+
with:
34+
name: "distribution"
35+
path: |
36+
dist
37+
- name: "Upload distribution packages to PyPI"
38+
uses: "pypa/gh-action-pypi-publish@release/v1"

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches:
77
- "master"
88
jobs:
9-
tox:
9+
test:
1010
name: "Test Python ${{ matrix.python-version }}"
1111
runs-on: "ubuntu-22.04"
1212
strategy:

0 commit comments

Comments
 (0)