Publish to PyPI #46
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
name: Publish to PyPI | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version to tag" | |
required: true | |
jobs: | |
tag: | |
uses: singnet/das-scripts-pipeline/.github/workflows/action.yml@master | |
with: | |
version: ${{ github.event.inputs.version }} | |
version-strategy: bump-version-from-variable-value | |
job-image-namespace: trueagi | |
job-image-version-semver: semantic-versioning | |
main-branch: master | |
version-tag-regex-pattern: /^\d+\.\d+\.\d+$/ | |
version-require-confirmation: "true" | |
library: hyperon-das-atomdb | |
secrets: inherit | |
publish: | |
environment: prod | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ^3.8.5 | |
- name: Install Poetry | |
run: | | |
pip install poetry | |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
- name: Build and publish package | |
run: | | |
poetry version ${{ github.event.inputs.version }} | |
poetry build | |
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} |