-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
039bc30
commit 0337555
Showing
68 changed files
with
338 additions
and
276 deletions.
There are no files selected for viewing
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
38 changes: 38 additions & 0 deletions
38
assets/files/pypi-cd-template-cac7a7a0d3f5806ee6451c68d396f70d.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Continuous Delivery for PyPI Project | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Trigger on push to the 'main' branch | ||
tags: | ||
- 'v*.*.*' # Trigger on tags matching semantic versioning (v1.0.0) | ||
|
||
jobs: | ||
# Job to set up the environment, install dependencies, and publish to PyPI | ||
publish-to-pypi: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' # Use a specific Python version, e.g., '3.8', '3.9', etc. | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build twine # Required for building and publishing to PyPI | ||
- name: Build the package | ||
run: | | ||
python -m build # This creates the distribution files under the 'dist' directory | ||
- name: Publish package to PyPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # Store PyPI credentials as GitHub secrets | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m twine upload dist/* # Uploads the package to PyPI |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.