Skip to content

Commit

Permalink
Create pypi-release.yaml
Browse files Browse the repository at this point in the history
This helps in automating the PyPi release when the package version is bumped.
  • Loading branch information
saieshwarm authored Apr 12, 2024
1 parent ebf8346 commit a52f865
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will release project to PyPI
name: CloudFormation CLI Python Plugin Release

on:
release:
types: [ published ]

jobs:
build:
if: endsWith(github.ref, '-plugin')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install --upgrade wheel twine
- name: Package project
run: |
python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to PyPI (If triggered from release)
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_KEY_CLOUDFORMATION_CLI_PYTHON_PLUGIN }}

0 comments on commit a52f865

Please sign in to comment.