-
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 e1c00a1
Showing
2 changed files
with
48 additions
and
1 deletion.
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,47 @@ | ||
name: Publish to PyPI-Test | ||
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: | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
|
||
build: | ||
needs: ['tests'] | ||
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-test-publish: | ||
needs: ['build'] | ||
environment: 'publish' | ||
|
||
name: upload release to PyPI-Test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Mandatory for trusted publishing | ||
id-token: write | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
|
||
- name: Publish package distributions to PyPI-Test | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages_dir: artifact/ | ||
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