Skip to content

SYS: Get ready to publish #2

SYS: Get ready to publish

SYS: Get ready to publish #2

Workflow file for this run

name: Publish package
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install packages
run: |
python -m pip install build twine
- name: Build
run: |
python -m build
- name: Upload to PyPi
if: startsWith(github.ref, 'refs/tags/')
run: |
twine upload dist/* --repository pypi -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
- name: Upload to TestPyPi
run: |
twine upload dist/* --repository testpypi -u __token__ -p ${{ secrets.TESTPYPI_API_TOKEN }}