generated from SylvanBrocard/dpu_trees
-
Notifications
You must be signed in to change notification settings - Fork 0
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
3d75c98
commit d8cbdb4
Showing
2 changed files
with
42 additions
and
13 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 |
---|---|---|
@@ -1,17 +1,16 @@ | ||
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
build: | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -27,10 +26,40 @@ jobs: | |
python -m | ||
build | ||
--sdist | ||
- name: Publish distribution 📦 to Test PyPI | ||
uses: pypa/[email protected] | ||
- name: Store the distribution package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
- name: Publish distribution 📦 to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/[email protected] | ||
name: python-package-sdist | ||
path: dist/ | ||
|
||
publish-to-testpypi: | ||
name: Publish Python 🐍 distributions 📦 to TestPyPI | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download the dist | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-sdist | ||
path: dist/ | ||
- name: Publish distribution 📦 to Test PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
|
||
publish-to-pypi: | ||
name: Publish Python 🐍 distributions 📦 to PyPI | ||
runs-on: ubuntu-22.04 | ||
if: startsWith(github.ref, 'refs/tags') | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download the dist | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-sdist | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/[email protected] |
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