File tree 2 files changed +34
-46
lines changed
2 files changed +34
-46
lines changed Original file line number Diff line number Diff line change 1
- name : Build and publish Python packages to PyPI
1
+ name : Publish Python 🐍 distributions 📦 to PyPI
2
2
3
- on :
4
- workflow_dispatch :
3
+ on :
5
4
release :
6
- types :
7
- - published
5
+ types : [created]
8
6
9
- jobs :
10
- build :
11
- runs-on : ubuntu-latest
12
- strategy :
13
- matrix :
14
- python-version :
15
- - " 3.8"
16
- - " 3.9"
17
- - " 3.10"
18
- steps :
19
- - uses : actions/checkout@v3
20
-
21
- - name : Set up Python
22
- uses : actions/setup-python@v4
23
- with :
24
- python-version : ${{ matrix.python-version }}
25
- cache : pip
26
-
27
- - name : Install build tool
28
- run : pip install build
29
7
30
- - name : Build package
31
- run : python -m build
32
-
33
- - name : Upload package as build artifact
34
- uses : actions/upload-artifact@v3
35
- with :
36
- name : package
37
- path : dist/
38
-
39
- publish :
8
+ jobs :
9
+ pypi-publish :
10
+ name : Upload release to PyPI
40
11
runs-on : ubuntu-latest
41
- needs : build
42
12
environment :
43
13
name : pypi
44
14
url : https://pypi.org/p/mir_eval
45
15
permissions :
46
- id-token : write
16
+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
17
+
47
18
steps :
48
- - name : Collect packages to release
49
-
50
- with :
51
- name : package
52
- path : dist/
53
-
54
- - name : Publish packages to PyPI
55
- uses : pypa/gh-action-pypi-publish@release/v1
19
+ - uses : actions/checkout@v4
20
+ - name : Set up Python 3.12
21
+ uses : actions/setup-python@v5
22
+ with :
23
+ python-version : 3.12
24
+
25
+ - name : Install pypa/build
26
+ run : >-
27
+ python -m
28
+ pip install
29
+ build
30
+ --user
31
+
32
+ - name : Build a binary wheel and a source tarball
33
+ run : >-
34
+ python -m
35
+ build
36
+ --sdist
37
+ --wheel
38
+ --outdir dist/
39
+ .
40
+
41
+ - name : Publish package distributions to PyPI
42
+ if : startsWith(github.ref, 'refs/tags')
43
+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 20
20
from . import transcription_velocity
21
21
from . import key
22
22
23
- __version__ = "0.8.0rc0 "
23
+ __version__ = "0.8.0rc1 "
You can’t perform that action at this time.
0 commit comments