| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,45 @@ | |||
| 1 | + name: Build & maybe upload PyPI package | ||
| 2 | + | ||
| 3 | + on: | ||
| 4 | + push: | ||
| 5 | + pull_request: | ||
| 6 | + release: | ||
| 7 | + types: | ||
| 8 | + - published | ||
| 9 | + workflow_dispatch: | ||
| 10 | + | ||
| 11 | + permissions: | ||
| 12 | + contents: read | ||
| 13 | + | ||
| 14 | + jobs: | ||
| 15 | + # Always build & lint package. | ||
| 16 | + build-package: | ||
| 17 | + name: Build & verify package | ||
| 18 | + runs-on: ubuntu-latest | ||
| 19 | + | ||
| 20 | + steps: | ||
| 21 | + - uses: actions/checkout@v3 | ||
| 22 | + | ||
| 23 | + - uses: hynek/build-and-inspect-python-package@v1 | ||
| 24 | + | ||
| 25 | + # Upload to real PyPI on GitHub Releases. | ||
| 26 | + release-pypi: | ||
| 27 | + name: Publish to PyPI | ||
| 28 | + environment: release-pypi | ||
| 29 | + # Only run for published releases. | ||
| 30 | + if: github.repository_owner == 'python' && github.event.action == 'published' | ||
| 31 | + runs-on: ubuntu-latest | ||
| 32 | + needs: build-package | ||
| 33 | + | ||
| 34 | + permissions: | ||
| 35 | + id-token: write | ||
| 36 | + | ||
| 37 | + steps: | ||
| 38 | + - name: Download packages built by build-and-inspect-python-package | ||
| 39 | + uses: actions/download-artifact@v3 | ||
| 40 | + with: | ||
| 41 | + name: Packages | ||
| 42 | + path: dist | ||
| 43 | + | ||
| 44 | + - name: Upload package to PyPI | ||
| 45 | + uses: pypa/gh-action-pypi-publish@release/v1 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,5 @@ | |||
| 1 | - # How to release | ||
| 1 | + How to release | ||
| 2 | + -------------- | ||
| 2 | 3 | ||
| 3 | 4 | - Update CHANGELOG.rst | |
| 4 | 5 | - bump version (YYYY.MM) in pyproject.toml | |
@@ -13,7 +14,8 @@ | |||
| 13 | 14 | - push the tag (``git push --tags``) | |
| 14 | 15 | ||
| 15 | 16 | ||
| 16 | - # Makefile usage | ||
| 17 | + Makefile usage | ||
| 18 | + -------------- | ||
| 17 | 19 | ||
| 18 | 20 | This project includes a simple Makefile for syncing changes to the theme with | |
| 19 | 21 | the main CPython repository. Run ``make help`` for details on available rules. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments