-
Notifications
You must be signed in to change notification settings - Fork 40
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
83fb02a
commit 0bfff2a
Showing
5 changed files
with
108 additions
and
25 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,48 @@ | ||
name: Publish to TestPyPI | ||
on: | ||
push: | ||
tags: | ||
# Only run for tags ending with `.devN` | ||
# https://peps.python.org/pep-0440/#summary-of-permitted-suffixes-and-relative-ordering | ||
- '*\.dev\d+' | ||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yml | ||
|
||
build: | ||
needs: ['test'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.11 | ||
|
||
- run: | | ||
pip install setuptools | ||
python setup.py sdist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./dist | ||
|
||
# https://docs.pypi.org/trusted-publishers/using-a-publisher/ | ||
test-pypi-publish: | ||
needs: ['build'] | ||
environment: 'publish-test' | ||
|
||
name: upload release to TestPyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Mandatory for trusted publishing | ||
id-token: write | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
|
||
- name: Publish package distributions to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: artifact/ | ||
print-hash: true | ||
repository-url: https://test.pypi.org/legacy/ |
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,48 @@ | ||
name: Publish to PyPI | ||
on: | ||
push: | ||
tags: | ||
# Only run for tags **not** ending with `.devN` | ||
# https://peps.python.org/pep-0440/#summary-of-permitted-suffixes-and-relative-ordering | ||
- '*' | ||
- '!*\.dev\d+' | ||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yml | ||
|
||
build: | ||
needs: ['test'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.11 | ||
|
||
- run: | | ||
pip install setuptools | ||
python setup.py sdist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./dist | ||
|
||
# https://docs.pypi.org/trusted-publishers/using-a-publisher/ | ||
pypi-publish: | ||
needs: ['build'] | ||
environment: 'publish' | ||
|
||
name: upload release to PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Mandatory for trusted publishing | ||
id-token: write | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: artifact/ | ||
print-hash: true |
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
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
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