5454 & "$env:CONDA\condabin\conda" init
5555
5656 - name : Install conda environment
57+ # TODO removed pinned v2 of catch2, see https://github.com/alliander-opensource/power-grid-model/issues/73
5758 run : |
58- conda create --yes -p C:\conda_envs\cpp_pkgs -c conda-forge boost-cpp eigen nlohmann_json mkl mkl-devel mkl-include catch2
59+ conda create --yes -p C:\conda_envs\cpp_pkgs -c conda-forge boost-cpp eigen nlohmann_json mkl mkl-devel mkl-include catch2==2.13.9
5960
6061 - name : Build and test
6162 run : |
9596 - uses : actions/checkout@v3
9697
9798 - name : Install cpp dependencies
99+ # TODO removed pinned v2 of catch2, see https://github.com/alliander-opensource/power-grid-model/issues/73
98100 run : |
99- brew install ninja boost eigen nlohmann-json catch2
101+ brew install ninja boost eigen nlohmann-json
102+ curl https://raw.githubusercontent.com/Homebrew/homebrew-core/5e5abb11bf49787d01164c4066119365262c21ed/Formula/catch2.rb > $(find $(brew --repository) -name catch2.rb) && brew reinstall catch2
100103 sudo pip3 install mkl mkl-devel mkl-include
101104
102105 - name : Build and test
@@ -197,6 +200,8 @@ jobs:
197200 publish-wheels :
198201 needs : build-and-test-python
199202 runs-on : ubuntu-latest
203+ permissions :
204+ contents : write
200205 env :
201206 TWINE_USERNAME : ${{ secrets.PYPI_USER }}
202207 TWINE_PASSWORD : ${{ secrets.PYPI_PASS }}
@@ -215,12 +220,30 @@ jobs:
215220 name : wheelhouse
216221 path : wheelhouse
217222
218- - name : List wheels
219- run : ls ./wheelhouse/*.whl -al
223+ - name : List assets
224+ run : |
225+ ls ./wheelhouse/*.whl -al
226+
227+ - name : Get tag
228+ id : tag
229+ run : echo "::set-output name=tag::v$(ls ./wheelhouse/*cp310*manylinux2014_x86_64*.whl | awk -F'[-]' '{print $2}')"
230+
231+ - name : Display tag
232+ run : echo "${{ steps.tag.outputs.tag }}"
220233
221234 - name : Upload wheels
222235 if : (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
223236 run : |
224237 pip install twine
225238 echo "Publish to PyPI..."
226239 twine upload --verbose wheelhouse/*
240+
241+ - name : Release
242+ uses : softprops/action-gh-release@v1
243+ if : (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
244+ with :
245+ files : |
246+ ./wheelhouse/*.whl
247+ tag_name : ${{ steps.tag.outputs.tag }}
248+ prerelease : ${{ contains(steps.tag.outputs.tag, 'rc') }}
249+ generate_release_notes : true
0 commit comments