Bump actions/setup-python #449
This file contains hidden or 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: build wheels | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: read | |
id-token: write | |
concurrency: | |
group: 'build-wheels-${{ github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
build_wheels: | |
strategy: | |
fail-fast: false | |
matrix: | |
spec: | |
- { name: 'linux x86_64', runner: ubuntu-latest } | |
- { name: 'macOS x86_64', runner: macos-latest } | |
# - { name: 'Windows x86_64', runner: windows-latest } | |
name: building ${{ matrix.spec.name }} | |
runs-on: ${{ matrix.spec.runner }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v6 | |
with: | |
python-version: '3.x' | |
- name: Install Python Tools | |
run: python -m pip install -U pip setuptools | |
- name: Install ziti and run integration tests | |
shell: bash | |
env: | |
ZITI_LOG: 4 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pip install -r tests/requirements.txt | |
pip install -r sample/requirements.txt | |
pip install . | |
python -m unittest tests/ziti_tests.py | |
- name: Build distro | |
run: | | |
python setup.py sdist | |
- uses: actions/upload-artifact@v4 | |
if: startsWith(matrix.spec.name, 'linux') | |
with: | |
name: openziiti-sdist | |
path: ./dist/* | |
publish: | |
runs-on: ubuntu-latest | |
# this step will fail on community contributed PRs | |
if: github.event.pull_request.head.repo.fork == false | |
needs: [ build_wheels ] | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v5 | |
with: | |
path: download | |
- name: check | |
run: | | |
ls -lR download | |
mkdir dist | |
cp download/* dist | |
- name: Publish wheels (TestPYPI) | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
packages-dir: dist | |
skip-existing: true | |
verbose: true | |
attestations: false | |
- name: Publish wheels (PyPI) | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: dist | |
verbose: true | |
attestations: true |