Added workflow and bump-version config file #1
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
name: PyPI Package Publishing Workflow | |
# Trigger the workflow when a pull request is closed in the 'main' branch | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- 'main' | |
jobs: | |
publish: | |
# Only run the job if the pull request is merged | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the project repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Setup Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
pip install setuptools wheel | |
# Build the package | |
- name: Build package | |
run: | | |
python setup.py sdist bdist_wheel | |
# Publish the package to PyPI | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_ACCESS_TOKEN }} |