Skip to content

Commit 00e0b09

Browse files
committed
feat: add GitHub Actions workflow for publishing Python packages to PyPI
1 parent ea55fed commit 00e0b09

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-n-publish:
9+
name: Build and publish Python distribution to PyPI
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: pypi
13+
url: https://pypi.org/project/spotify-monitor/
14+
permissions:
15+
id-token: write
16+
contents: read
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.x"
24+
- name: Install build
25+
run: python3 -m pip install build --user
26+
- name: Build a binary wheel and a source tarball
27+
run: python3 -m build
28+
- name: Publish distribution to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)