-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github workflow to upload build to pypi
- Loading branch information
Showing
1 changed file
with
40 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,40 @@ | ||
jobs: | ||
release-build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: build release distributions | ||
run: | | ||
python setup.py build | ||
- name: upload build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release-build | ||
path: build/ | ||
|
||
pypi-publish: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- release-build | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/wespe | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Retrieve release build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: release-build | ||
path: build/ | ||
|
||
- name: Publish release build to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |