-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create python-pypi-publish.yaml (#39)
Signed-off-by: Bradley Reynolds <bradley.reynolds@darbia.dev>
- Loading branch information
1 parent
f73bac9
commit 21be6fb
Showing
1 changed file
with
49 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: "Publish Python 🐍 distributions 📦 to PyPI" | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
build-publish: | ||
name: "Build and publish Python 🐍 distributions 📦 to PyPI" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: "Checkout repository" | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
- name: "Set up Python 3.x" | ||
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 | ||
with: | ||
python-version: "3.x" | ||
cache: "pip" | ||
cache-dependency-path: "pyproject.toml" | ||
|
||
- name: "Install pypa/build" | ||
run: >- | ||
python -m | ||
pip install | ||
build | ||
--user | ||
- name: "Build a binary wheel and a source tarball" | ||
run: >- | ||
python -m | ||
build | ||
--outdir dist/ | ||
- name: "Upload packages" | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
with: | ||
name: packages | ||
path: dist | ||
|
||
- name: "Publish distribution 📦 to PyPI" | ||
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10 | ||
with: | ||
skip-existing: true | ||
verbose: true | ||
print-hash: true |