Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Refactor (#1473)

Refactor (#1473) #832

name: Upload Python Package
on:
release:
types: [published]
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
permissions:
contents: read
jobs:
ci:
if: github.event_name != 'release'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.11"]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: make
- name: Build CI
run: make build
- name: Syntax CI
run: make ci
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11.0'
- name: Install dependencies
run: make
- name: Build package
run: make build
- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}