-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix for #19 - Update PyPI publishing - Refine README - Rename `get_cache_dir()` to `get_cache_root()` - Rename `get_config_dir()` to `get_config_root()` - Rename `get_data_dir()` to `get_data_root()` - Rename `get_project_dir()` to `get_project_root()`
- Loading branch information
1 parent
030ea14
commit 31c06d3
Showing
11 changed files
with
70 additions
and
66 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 |
---|---|---|
@@ -1,36 +1,41 @@ | ||
name: Publishing | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
on: push | ||
|
||
jobs: | ||
pypi: | ||
name: Publish to PyPI | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- '3.12' | ||
os: | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
#---------------------------------------------- | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
#---------------------------------------------- | ||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup environment | ||
run: pip install twine build packaging | ||
#---------------------------------------------- | ||
- name: Build project | ||
python-version: '3.12' | ||
- name: Install pypa/build | ||
run: pip install build | ||
- name: Build a binary wheel and a source tarball | ||
run: python -m build | ||
- name: Check dist | ||
run: twine check dist/* | ||
- name: Publish project | ||
run: twine upload --username __token__ --password ${{ secrets.PYPI_TOKEN }} dist/* | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-to-pypi: | ||
name: Publish to PyPI | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/perdoo | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- uses: pypa/gh-action-pypi-publish@release/v1 |
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
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
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
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