Skip to content

Commit e5d8c34

Browse files
authored
PyPi publishing action (#90)
1 parent 255b5b5 commit e5d8c34

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
# From: https://docs.pypi.org/trusted-publishers/using-a-publisher/
3+
on:
4+
release:
5+
types:
6+
- published
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
name: release
10+
jobs:
11+
pypi-publish:
12+
name: Upload release to PyPI
13+
runs-on: ubuntu-latest
14+
permissions:
15+
# IMPORTANT: this permission is mandatory for trusted publishing
16+
id-token: write
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: '3.10'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install build
27+
- name: Build package
28+
run: python -m build
29+
- name: Publish package distributions to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)