-
Notifications
You must be signed in to change notification settings - Fork 13
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
Showing
1 changed file
with
50 additions
and
3 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 |
---|---|---|
|
@@ -16,10 +16,11 @@ permissions: | |
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
environment: PyPI | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -33,8 +34,54 @@ jobs: | |
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Upload dist | ||
uses: actions/[email protected] | ||
with: | ||
name: zospy_dist | ||
path: "dist/" | ||
|
||
publish_to_pypi: | ||
name: Publish to PyPI | ||
|
||
runs-on: ubuntu-latest | ||
environment: PyPI | ||
|
||
steps: | ||
- name: Download dist | ||
uses: actions/[email protected] | ||
with: | ||
name: zospy_dist | ||
path: dist | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
upload_to_github: | ||
name: Upload to GitHub | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
needs: build | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Download dist | ||
uses: actions/[email protected] | ||
with: | ||
name: zospy_dist | ||
path: dist | ||
- name: Upload wheels to GitHub release | ||
uses: svenstaro/[email protected] | ||
with: | ||
tag: ${{ github.ref }} | ||
file: "dist/*.whl" | ||
file_glob: true | ||
- name: Upload dist to GitHub release | ||
uses: svenstaro/[email protected] | ||
with: | ||
tag: ${{ github.ref }} | ||
file: "dist/*.tar.gz" | ||
file_glob: true |