@@ -37,25 +37,29 @@ jobs:
3737 strategy :
3838 matrix :
3939 include :
40- # - { os: ubuntu-latest, python: '3.10', arch: x64 }
41- # - { os: ubuntu-latest, python: '3.9', arch: x64 }
42- - { os: ubuntu-latest, python: '3.8', arch: x64 }
43- # - { os: ubuntu-latest, python: '3.7', arch: x64 }
44-
45- # - { os: macos-latest, python: '3.10', arch: x64 }
46- # - { os: macos-latest, python: '3.9', arch: x64 }
47- # - { os: macos-latest, python: '3.8', arch: x64 }
48- # - { os: macos-latest, python: '3.7', arch: x64 }
49-
50- # - { os: windows-latest, python: '3.10', arch: x64 }
51- # - { os: windows-latest, python: '3.9', arch: x64 }
52- # - { os: windows-latest, python: '3.8', arch: x64 }
53- # - { os: windows-latest, python: '3.7', arch: x64 }
54-
55- # - { os: windows-latest, python: '3.10', arch: x86 }
56- # - { os: windows-latest, python: '3.9', arch: x86 }
57- # - { os: windows-latest, python: '3.8', arch: x86 }
58- # - { os: windows-latest, python: '3.7', arch: x86 }
40+ - { os: ubuntu-latest, python: '3.11', arch: x64, conda: true}
41+ # - { os: ubuntu-latest, python: '3.10', arch: x64, conda: true }
42+ # - { os: ubuntu-latest, python: '3.9', arch: x64, conda: true }
43+ # - { os: ubuntu-latest, python: '3.8', arch: x64, conda: true }
44+ # - { os: ubuntu-latest, python: '3.7', arch: x64, conda: true }
45+
46+ # - { os: macos-11, python: '3.11', arch: x64, conda: true }
47+ # - { os: macos-11, python: '3.10', arch: x64, conda: true }
48+ # - { os: macos-11, python: '3.9', arch: x64, conda: true }
49+ # - { os: macos-11, python: '3.8', arch: x64, conda: true }
50+ # - { os: macos-11, python: '3.7', arch: x64, conda: true }
51+
52+ # - { os: windows-latest, python: '3.11', arch: x64, conda: true }
53+ # - { os: windows-latest, python: '3.10', arch: x64, conda: true }
54+ # - { os: windows-latest, python: '3.9', arch: x64, conda: true }
55+ # - { os: windows-latest, python: '3.8', arch: x64, conda: true }
56+ # - { os: windows-latest, python: '3.7', arch: x64, conda: true }
57+
58+ # - { os: windows-latest, python: '3.11', arch: x86, conda: false } # conda not yet available
59+ # - { os: windows-latest, python: '3.10', arch: x86, conda: true }
60+ # - { os: windows-latest, python: '3.9', arch: x86, conda: true }
61+ # - { os: windows-latest, python: '3.8', arch: x86, conda: true }
62+ # - { os: windows-latest, python: '3.7', arch: x86, conda: true }
5963
6064 if : github.repository == 'labscript-suite/labscript-devices' && (github.event_name != 'create' || github.event.ref_type != 'branch')
6165 steps :
9599 path : ./dist
96100
97101 - name : Set Variables for Conda Build
102+ if : matrix.conda
98103 shell : bash
99104 run : |
100105 if [ $NOARCH == true ]; then
@@ -105,37 +110,36 @@ jobs:
105110 echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
106111
107112 - name : Install Miniconda
108- # We need https://github.com/conda-incubator/setup-miniconda/pull/189 in order
109- # to be able to install 32-bit miniconda on Windows. Once setup-miniconda 2.1.2
110- # is released with this fix, can change to @v2.
111- uses : conda-incubator/setup-miniconda@1a875d105ac03256664b54c882c8c374ce617ef6
113+ if : matrix.conda
114+ uses : conda-incubator/setup-miniconda@v2
112115 with :
113116 auto-update-conda : true
114117 python-version : ${{ matrix.python }}
115118 architecture : ${{ matrix.arch }}
116119 miniconda-version : " latest"
117120
118- - name : Workaround conda-build incompatibility with xcode >12
121+ - name : Workaround conda-build incompatibility with xcode 12+
119122 if : runner.os == 'macOS'
120123 uses : maxim-lobanov/setup-xcode@v1
121124 with :
122125 xcode-version : 11.7
123126
124127 - name : Conda package (Unix)
125- if : runner.os != 'Windows'
128+ if : (matrix.conda && runner.os != 'Windows')
126129 shell : bash -l {0}
127130 run : |
128131 conda install -c labscript-suite setuptools-conda
129132 setuptools-conda build $CONDA_BUILD_ARGS .
130133
131134 - name : Conda Package (Windows)
132- if : runner.os == 'Windows'
135+ if : (matrix.conda && runner.os == 'Windows')
133136 shell : cmd /C CALL {0}
134137 run : |
135138 conda install -c labscript-suite setuptools-conda && ^
136139 setuptools-conda build %CONDA_BUILD_ARGS% --croot ${{ runner.temp }}\cb .
137140
138141 - name : Upload Artifact
142+ if : matrix.conda
139143 uses : actions/upload-artifact@v3
140144 with :
141145 name : conda_packages
@@ -161,7 +165,7 @@ jobs:
161165 if : env.PURE == 'false'
162166 uses : RalfG/python-wheels-manylinux-build@v0.4.2
163167 with :
164- python-versions : ' cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
168+ python-versions : ' cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 '
165169 pre-build-command : ' git config --global --add safe.directory "*"'
166170
167171 - name : Upload Artifact
@@ -189,45 +193,34 @@ jobs:
189193 name : conda_packages
190194 path : ./conda_packages
191195
192- - name : Publish on TestPyPI
193- uses : pypa/gh-action-pypi-publish@release/v1
194- with :
195- user : __token__
196- password : ${{ secrets.testpypi }}
197- repository_url : https://test.pypi.org/legacy/
198-
199196 - name : Get Version Number
200197 if : github.event.ref_type == 'tag'
201198 run : |
202199 VERSION="${GITHUB_REF/refs\/tags\/v/}"
203200 echo "VERSION=$VERSION" >> $GITHUB_ENV
204201
205- - name : Create GitHub Release
202+ - name : Create GitHub Release and Upload Release Asset
206203 if : github.event.ref_type == 'tag'
207- id : create_release
208- uses : actions/create-release@latest
204+ uses : softprops/action-gh-release@v1
209205 env :
210206 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
211207 with :
212208 tag_name : ${{ github.event.ref }}
213- release_name : ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
209+ name : ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
214210 draft : true
215211 prerelease : ${{ contains(github.event.ref, 'rc') }}
212+ files : ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
216213
217- - name : Upload Release Asset
218- if : github.event.ref_type == 'tag'
219- uses : actions/upload-release-asset@v1
220- env :
221- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
214+ - name : Publish on TestPyPI
215+ uses : pypa/gh-action-pypi-publish@release/v1
222216 with :
223- upload_url : ${{ steps.create_release.outputs.upload_url }}
224- asset_path : ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
225- asset_name : ${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
226- asset_content_type : application/gzip
217+ user : __token__
218+ password : ${{ secrets.testpypi }}
219+ repository-url : https://test.pypi.org/legacy/
227220
228221 - name : Publish on PyPI
229222 if : github.event.ref_type == 'tag'
230- uses : pypa/gh-action-pypi-publish@master
223+ uses : pypa/gh-action-pypi-publish@release/v1
231224 with :
232225 user : __token__
233226 password : ${{ secrets.pypi }}
0 commit comments