This repository was archived by the owner on Feb 26, 2025. It is now read-only.
Commit 87f536a 1 parent 57e86fc commit 87f536a Copy full SHA for 87f536a
File tree 2 files changed +81
-0
lines changed
2 files changed +81
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish sdist tarball to PyPi
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' [0-9]+.[0-9]+.[0-9]+'
7
+
8
+ jobs :
9
+ publish :
10
+ name : Publish package to PyPI
11
+ runs-on : ubuntu-latest
12
+ needs : [build_sdist, test_sdist]
13
+ steps :
14
+ - name : Download artifacts produced during the build_wheels and build_sdist jobs
15
+ uses : actions/download-artifact@v3
16
+ with :
17
+ name : dist
18
+ path : dist/
19
+ - name : Display structure of downloaded files
20
+ run : ls -R
21
+ working-directory : dist
22
+ - name : Publish source distribution package to PyPI
23
+ uses : pypa/gh-action-pypi-publish@master
24
+ with :
25
+ password : ${{ secrets.PYPI_API_TOKEN }}
26
+ packages_dir : dist/
Original file line number Diff line number Diff line change
1
+ name : Build and test source distribution
2
+
3
+ on :
4
+ push :
5
+ branches : ['main']
6
+ tags : ['[0-9]+.[0-9]+.[0-9]+']
7
+ pull_request :
8
+
9
+ jobs :
10
+ build_sdist :
11
+ name : Build source distribution
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v3
15
+ - name : Set up Python 3.12
16
+ uses : actions/setup-python@v4
17
+ with :
18
+ python-version : 3.12
19
+ - name : Build a source tarball
20
+ run : |
21
+ python -m pip install build
22
+ python -m build
23
+ - name : Store sdist as artifact
24
+ uses : actions/upload-artifact@v3
25
+ with :
26
+ name : dist
27
+ path : dist/*.tar.gz
28
+
29
+ test_sdist :
30
+ name : Build source distribution
31
+ runs-on : ubuntu-latest
32
+ steps :
33
+ - uses : actions/checkout@v3
34
+ - name : Set up Python 3.12
35
+ uses : actions/setup-python@v4
36
+ with :
37
+ python-version : 3.12
38
+ - name : Download artifacts produced during the build_wheels and build_sdist jobs
39
+ uses : actions/download-artifact@v3
40
+ with :
41
+ name : dist
42
+ path : dist/
43
+ - name : Install package, clean local directory
44
+ run : |
45
+ rm -rf fz_td_recipe/
46
+ python -m pip install dist/*
47
+ python -m pip install pytest
48
+ - name : Run tests
49
+ run : |
50
+ pytest tests
51
+ - name : Store sdist as artifact
52
+ uses : actions/upload-artifact@v3
53
+ with :
54
+ name : dist
55
+ path : dist/*.tar.gz
You can’t perform that action at this time.
0 commit comments