ci: include intel OSX #19
Workflow file for this run
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
# Checkout master, create sdist and bdist, and release to pypi | |
name: Release to PyPi | |
on: | |
workflow_dispatch: | |
inputs: | |
pypi-target: | |
description: Deploy to PyPi [Main] or [Test] | |
required: true | |
default: 'Main' | |
push: | |
tags: | |
- v*.* | |
pull_request: | |
jobs: | |
validations: | |
uses: ./.github/workflows/validate-pr-commit.yml | |
deploy-pypi: | |
name: Build ${{ matrix.os }} Python ${{ matrix.python-version }} | |
needs: [validations] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, macos-13 ] | |
python-version: ["3.11"] | |
steps: | |
- name: restore artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: setup-artifact-${{ matrix.os }}-py${{ matrix.python-version }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4.7.1 | |
with: | |
python-version: '${{ matrix.python-version }}' | |
check-latest: true | |
- if: success() && matrix.os != 'windows-latest' | |
name: extract and build | |
run: | | |
tar -xf boatest.tar.gz | |
cd boatest | |
source venv/bin/activate | |
pip install wheel | |
make build | |
- if: success() && matrix.os == 'windows-latest' | |
name: extract and build | |
run: | | |
tar -xf boatest.tar.gz | |
cd boatest | |
venv\Scripts\activate | |
pip install wheel | |
make build | |
- name: Validate dist | |
run: | | |
pip install twine | |
twine check boatest/dist/* | |
- name: Draft release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: Draft | |
name: Draft | |
draft: true | |
files: | | |
boatest/dist/*.whl | |
env: | |
GITHUB_TOKEN: ${{ secrets.deploy }} | |
# - if: github.event.inputs.pypi-target == 'Main' || github.event_name == 'push' | |
# name: Publish to PyPi | |
# env: | |
# TWINE_USERNAME: __token__ | |
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
# run: | | |
# twine upload boatest/dist/*.whl | |
# - if: github.event.inputs.pypi-target == 'Test' | |
# name: Publish to Test-PyPi | |
# env: | |
# TWINE_USERNAME: __token__ | |
# TWINE_PASSWORD: ${{ secrets.PYPI_TEST_API_TOKEN }} | |
# run: | | |
# twine upload --repository testpypi boatest/dist/*.whl |