Skip to content

1.1.1

1.1.1 #34

Workflow file for this run

name: PyPI Publish
on:
release:
types: [published]
jobs:
pypi-publish:
name: Publish tagged release on PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Install the newly build package with all extras
run: |
TAR_PATH="$( realpath ./dist/*.tar.gz)"
python -m \
pip install \
"${TAR_PATH}[all]"
- name: Install testing requirements
run: >-
python -m
pip install
-r requirements-dev.txt
- name: Run pytest on freshly installed package
run: |
export GHGA_CONNECTOR_CONFIG_YAML=./.devcontainer/.dev_config.yaml
pytest .
- name: Publish distribution package to PyPI (test)
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution package to PyPI (production)
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}