File tree Expand file tree Collapse file tree 1 file changed +34
-26
lines changed Expand file tree Collapse file tree 1 file changed +34
-26
lines changed Original file line number Diff line number Diff line change 1
1
name : Publishing
2
2
3
- on :
4
- push :
5
- tags :
6
- - ' [0-9]+.[0-9]+.[0-9]+'
3
+ on : push
7
4
8
5
jobs :
9
- pypi :
10
- name : Publish to PyPI
11
- strategy :
12
- fail-fast : false
13
- matrix :
14
- python-version :
15
- - ' 3.12'
16
- os :
17
- - ubuntu-latest
18
- runs-on : ${{ matrix.os }}
6
+ build :
7
+ name : Build
8
+ runs-on : ubuntu-latest
9
+
19
10
steps :
20
- - name : Checkout repository
21
- uses : actions/checkout@v4
22
- - name : Setup python
23
- uses : actions/setup-python@v5
11
+ - uses : actions/checkout@v4
12
+ - uses : actions/setup-python@v5
24
13
with :
25
- python-version : ${{ matrix.python-version }}
26
- - name : Setup environment
27
- run : pip install twine build packaging
28
- - name : Build project
14
+ python-version : ' 3.12 '
15
+ - name : Install pypa/build
16
+ run : pip install build
17
+ - name : Build a binary wheel and a source tarball
29
18
run : python -m build
30
- - name : Check dist
31
- run : twine check dist/*
32
- - name : Publish project
33
- run : twine upload --username __token__ --password ${{ secrets.PYPI_TOKEN }} dist/*
19
+ - uses : actions/upload-artifact@v3
20
+ with :
21
+ name : python-package-distributions
22
+ path : dist/
23
+
24
+ publish-to-pypi :
25
+ name : Publish to PyPI
26
+ if : startsWith(github.ref, 'refs/tags/')
27
+ needs :
28
+ - build
29
+ runs-on : ubuntu-latest
30
+ environment :
31
+ name : pypi
32
+ url : https://pypi.org/p/simyan
33
+ permissions :
34
+ id-token : write
35
+
36
+ steps :
37
+ - uses : actions/download-artifact@v3
38
+ with :
39
+ name : python-package-distributions
40
+ path : dist/
41
+ - uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments