Upload Python Package #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will upload a Python Package using Twine when a release is created | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Upload Python Package | |
on: workflow_dispatch | |
# on: | |
# # release: | |
# # types: [published] | |
# on: workflow_dispatch | |
# push: | |
# branches: [ "master" ] | |
# # Publish semver tags as releases. | |
# tags: [ 'v*.*.*' ] | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: fix openssl legacy mode | |
run: sudo sed -i '/^default = default_sect/a legacy = legacy_sect' /etc/ssl/openssl.cnf && sudo sed -i 's/#openssl_conf/openssl_conf/g' /etc/ssl/openssl.cnf && sudo sed -i '/^\[default_sect\]/a activate = 1\n\[legacy_sect\]\nactivate = 1' /etc/ssl/openssl.cnf | |
- name: Install tox and any other packages | |
run: pip install tox | |
- name: Run Unit Test via tox | |
# Run tox using the version of Python in `PATH` | |
run: tox -e py | |
- name: Run Lint via tox | |
run: tox -e lint | |
- name: Build wheel | |
# Run tox using the version of Python in `PATH` | |
run: tox -e build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |