Skip to content

Commit 4753660

Browse files
committed
Update installation instructions in Readme.md and add GitHub Actions workflow for publishing to PyPI
1 parent b3624b3 commit 4753660

File tree

2 files changed

+59
-4
lines changed

2 files changed

+59
-4
lines changed

.github/workflows/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v5
13+
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v7
16+
with:
17+
version: "latest"
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.x"
23+
24+
- name: Build package
25+
run: uv build
26+
27+
- name: Upload artifacts
28+
uses: actions/upload-artifact@v3
29+
with:
30+
name: python-package-distributions
31+
path: dist/
32+
33+
publish:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
environment: pypi
37+
permissions:
38+
id-token: write # Required for trusted publishing
39+
40+
steps:
41+
- name: Download artifacts
42+
uses: actions/download-artifact@v3
43+
with:
44+
name: python-package-distributions
45+
path: dist/
46+
47+
- name: Publish package to PyPI
48+
uses: pypa/gh-action-pypi-publish@release/v1

Readme.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,25 @@ for sound in results:
2929
```
3030

3131
## Installation
32-
1) clone or download
3332

34-
2) run:
33+
The easiest way to install is using pip:
34+
3535
```
36-
python setup.py install
36+
pip install freesound
3737
```
3838

39-
Alternatively you should also be able to install directly from GitHub with:
39+
Alternatively, you can install directly from GitHub:
40+
4041
```
4142
pip install git+https://github.com/MTG/freesound-python
4243
```
4344

45+
Or clone the repository and install manually:
46+
47+
```
48+
python -m pip install .
49+
```
50+
4451
## Advanced usage
4552

4653
### Modifying the requests' session:

0 commit comments

Comments
 (0)