forked from python/pyperformance
-
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.
.github: Add Automated release process (pythongh-251)
* .github: Add Automated release process * rebase * Fix wrongly rebased code * Apply suggestions from code review Co-authored-by: Eric Snow <[email protected]> * pyproject.toml: Address code review Co-authored-by: Eric Snow <[email protected]>
- Loading branch information
1 parent
b1aff44
commit 340008c
Showing
2 changed files
with
40 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,32 @@ | ||
# For more information, see the "Release a new version" notes in pyproject.toml. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
cache: pip | ||
cache-dependency-path: pyproject.toml | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade build | ||
- name: Build | ||
run: | | ||
python -m build | ||
- name: Publish distribution 📦 to PyPI | ||
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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