Skip to content

Commit fbfb45b

Browse files
authored
Create pypi-release.yaml (#271)
This helps in automating the PyPi release when the package version is bumped.
1 parent d65ce59 commit fbfb45b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/pypi-release.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will release project to PyPI
2+
name: CloudFormation CLI Python Plugin Release
3+
4+
on:
5+
release:
6+
types: [ published ]
7+
8+
jobs:
9+
build:
10+
if: endsWith(github.ref, '-plugin')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python 3.11
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.11
18+
- name: Install dependencies
19+
run: |
20+
pip install --upgrade wheel twine
21+
- name: Package project
22+
run: |
23+
python setup.py sdist bdist_wheel
24+
- name: Publish distribution 📦 to PyPI (If triggered from release)
25+
uses: pypa/gh-action-pypi-publish@master
26+
with:
27+
password: ${{ secrets.PYPI_API_KEY_CLOUDFORMATION_CLI_PYTHON_PLUGIN }}

0 commit comments

Comments
 (0)