File tree 2 files changed +61
-1
lines changed
2 files changed +61
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : packing
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+ pull_request_target :
7
+ types : [labeled]
8
+
9
+ jobs :
10
+ pack_pip :
11
+ # We want to run on external PRs, but not on our own internal
12
+ # PRs as they'll be run by the push to the branch.
13
+ #
14
+ # The main trick is described here:
15
+ # https://github.com/Dart-Code/Dart-Code/pull/2375
16
+ if : (github.event_name == 'push') ||
17
+ (github.event_name == 'pull_request' &&
18
+ github.event.pull_request.head.repo.full_name != github.repository)
19
+ runs-on : ubuntu-20.04
20
+
21
+ strategy :
22
+ fail-fast : false
23
+
24
+ steps :
25
+ - name : Clone the connector repo
26
+ uses : actions/checkout@v3
27
+ # Checkout all tags for correct version computation
28
+ with :
29
+ fetch-depth : 0
30
+
31
+ - name : Setup Python and basic packing tools
32
+ uses : actions/setup-python@v4
33
+ with :
34
+ python-version : ' 3.10'
35
+
36
+ - name : Install tools for packing
37
+ run : pip3 install wheel
38
+
39
+ - name : Install tools for package verification
40
+ run : pip3 install twine
41
+
42
+ - name : Pack source code
43
+ run : make sdist
44
+
45
+ - name : Pack wheel file
46
+ run : make wheel
47
+
48
+ - name : Verify the package
49
+ run : twine check dist/*
50
+
51
+ - name : Archive pip artifacts
52
+ uses : actions/upload-artifact@v3
53
+ with :
54
+ name : pip_package
55
+ path : dist
56
+ retention-days : 1
Original file line number Diff line number Diff line change 1
- .PHONY : install test docs
1
+ .PHONY : install test docs sdist wheel
2
2
install :
3
3
pip install --editable .
4
4
test :
@@ -13,3 +13,7 @@ cov-report:
13
13
python -m coverage report
14
14
docs :
15
15
python setup.py build_sphinx
16
+ sdist :
17
+ python3 setup.py sdist --dist-dir=dist
18
+ wheel :
19
+ python3 setup.py bdist_wheel --dist-dir=dist
You can’t perform that action at this time.
0 commit comments