35 строки
1.2 KiB
YAML
35 строки
1.2 KiB
YAML
on:
|
|
# Trigger the workflow on push or pull request,
|
|
# but only for the main branch
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
release:
|
|
types: # This configuration does not affect the page_build event above
|
|
- created
|
|
workflow_dispatch:
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
|
architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified
|
|
- name: install requirements
|
|
run: pip install -r requirements.txt
|
|
- name: pyright
|
|
run: npx pyright
|
|
- name: Publish semantic release 📦 to PyPI
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
uses: relekang/python-semantic-release@master
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
pypi_token: ${{ secrets.PYPI_TOKEN }}
|