mirror of
https://github.com/nqrduck/nqrduck-autotm.git
synced 2024-11-05 09:50:02 +00:00
45 lines
908 B
YAML
45 lines
908 B
YAML
|
name: Build, Test, and Upload Python Package
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
tags:
|
||
|
- "v*.*.*"
|
||
|
|
||
|
workflow_dispatch:
|
||
|
|
||
|
permissions:
|
||
|
contents: read
|
||
|
|
||
|
jobs:
|
||
|
# test:
|
||
|
# uses: ./.github/workflows/ubuntu-python-package.yml # use the callable tests job to run tests
|
||
|
|
||
|
deploy:
|
||
|
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
# needs: [test]
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
|
||
|
- name: Set up Python
|
||
|
uses: actions/setup-python@v3
|
||
|
with:
|
||
|
python-version: "3.11"
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: |
|
||
|
sudo apt-get update
|
||
|
python -m pip install --upgrade pip
|
||
|
|
||
|
- name: Publish to PyPI
|
||
|
run: |
|
||
|
python -m venv venv
|
||
|
. ./venv/bin/activate
|
||
|
pip install -U twine build
|
||
|
python -m build .
|
||
|
python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/*
|
||
|
env:
|
||
|
PYPI: ${{ secrets.PYPI }}
|