CI: Pin micromamba for windows test (#181) #152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: [ created ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install build twine!=5.1.0 | |
- name: Build package | |
shell: bash | |
run: | | |
python -m build | |
twine check --strict dist/* | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./dist/* | |
retention-days: 5 | |
publish: | |
name: Publish on PyPI | |
needs: [build] | |
runs-on: ubuntu-latest | |
# release on every tag | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
path: dist | |
- name: Upload Wheels to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
skip_existing: true | |
# repository_url: https://test.pypi.org/legacy/ # To test |