File tree 1 file changed +66
-0
lines changed
1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2025 Howetuft
2
+ #
3
+ #
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # This workflow publishes a release to Pypi (or Pypi test)
7
+
8
+
9
+ name : LuxCore Python Wheels Publisher
10
+
11
+ on :
12
+ workflow_dispatch :
13
+ inputs :
14
+ release-tag :
15
+ description : " Tag of the release to publish"
16
+ required : True
17
+ default : v0.0.1
18
+ type : string
19
+ test :
20
+ description : " Publish on Pypi test"
21
+ required : True
22
+ default : True
23
+ type : boolean
24
+
25
+ jobs :
26
+ publish-wheels :
27
+ name : Publish release '${{ inputs.release-tag }}'
28
+ runs-on : ubuntu-latest
29
+ environment :
30
+ name : ${{ inputs.test && 'testpypi' || 'pypi' }}
31
+ url : ${{ inputs.test && 'https://test.pypi.org/p/pyluxcore' || 'https://pypi.org/p/pyluxcore' }}
32
+ env :
33
+ GH_TOKEN : ${{ github.token }}
34
+ permissions :
35
+ id-token : write
36
+ contents : read
37
+
38
+ steps :
39
+ - uses : actions/checkout@v4
40
+
41
+ - name : Download wheels from release '${{ inputs.release-tag }}'
42
+ shell : bash
43
+ run : |
44
+ # Warning: Target release must not be in 'draft' status,
45
+ # otherwise gh release won't find it
46
+ gh release download ${{ inputs.release-tag}} -D tmp -R LuxCoreRender/LuxCoreWheels
47
+ mkdir dist
48
+ for d in tmp/*.zip ; do
49
+ echo "unzip ${d}"
50
+ unzip ${d} -d dist
51
+ done
52
+ ls -Rl dist
53
+
54
+ - name : Publish package distributions to PyPI test
55
+ if : inputs.test
56
+ uses : pypa/gh-action-pypi-publish@release/v1
57
+ with :
58
+ repository-url : https://test.pypi.org/legacy/
59
+ verbose : true
60
+ verify-metadata : true
61
+ skip-existing : true
62
+
63
+ - name : Publish package distributions to PyPI
64
+ if : ${{ ! inputs.test }}
65
+ uses : pypa/gh-action-pypi-publish@release/v1
66
+
You can’t perform that action at this time.
0 commit comments