Skip to content

Merge branch 'docs_remove_ufz_from_logo' into 'develop' #38

Merge branch 'docs_remove_ufz_from_logo' into 'develop'

Merge branch 'docs_remove_ufz_from_logo' into 'develop' #38

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "develop"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_sdist:
name: sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build sdist
run: |
python -m pip install --upgrade pip
pip install build
python -m build --sdist
- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
build_wheels:
name: wheels for ${{ matrix.cfg.os }} / ${{ matrix.cfg.arch }}
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-latest, arch: x86_64 }
- { os: macos-latest, arch: x86_64 }
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.cfg.arch }}
with:
output-dir: dist
- uses: actions/upload-artifact@v2
with:
path: ./dist/*.whl
upload_to_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- name: Publish to Test PyPI
# only if working on main
if: github.ref == 'refs/heads/develop'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_api_token }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish to PyPI
# only if tagged
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_api_token }}