set image pull secrets at the correct spec in the yaml tree #33
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: Python Package Build and Publish | |
on: | |
push: | |
branches: | |
- main # Only run workflow for pushes to main branch | |
release: | |
types: [created] # Run workflow when a new release is created | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 # Checkout the repository content to GitHub Actions runner | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' # Specify the Python version | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools wheel twine | |
- name: Build source and wheel distribution | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Publish the distribution to PyPI | |
if: github.event_name == 'release' && github.event.action == 'created' | |
run: twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |