Skip to content

Release v1.2.3

Release v1.2.3 #12

Workflow file for this run

name: Release
run-name: Release ${{ github.ref_name }}
on:
workflow_dispatch:
jobs:
build-wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-12]
steps:
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/cibuildwheel@v2.14.1
- name: Store wheels
uses: actions/upload-artifact@v3
with:
name: dist
path: wheelhouse/*.whl
build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tar.gz
upload-pypi:
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download dist
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Store whether the current ref is on main
id: check-ref-on-main
run: |
git fetch --all --filter=tree:0
printf "ref_on_main=%s\n" \
$(git branch -a --contains HEAD --format "%(refname:short)" \
| grep "^main$" &> /dev/null \
&& echo "true" \
|| echo "false" \
) \
>> $GITHUB_OUTPUT
- name: Upload to TestPyPi
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ steps.check-ref-on-main.outputs.ref_on_main != 'true' }}
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Upload to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ steps.check-ref-on-main.outputs.ref_on_main == 'true' }}
with:
password: ${{ secrets.PYPI_API_TOKEN }}