Use recommended naming pattern for entry points. #37
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
# .github/workflows/release.yml | |
name: π¦ Release 'keyrings.codeartifact' package. | |
on: push | |
jobs: | |
release: | |
name: π¦ Build and publish package. | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- name: π Checkout repository source code. | |
uses: actions/checkout@v4 | |
with: | |
# Always fetch the full repository. | |
fetch-depth: 0 | |
- name: β¨ Setup Python 3.x environment. | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
cache: 'pip' | |
- name: π¬ Execute all unit tests. | |
run: | | |
python3 -m pip install .[testing] | |
python3 -m pytest | |
- name: π οΈ Build package and source distribution. | |
run: | | |
python3 -m pip install --user build | |
python3 -m build --sdist --wheel --outdir dist/ | |
- name: π Publish package to test PyPI index. | |
uses: pypa/gh-action-pypi-publish@release/v1.8 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
skip-existing: true | |
- name: π Publish package to main PyPI index. | |
uses: pypa/gh-action-pypi-publish@release/v1.8 | |
if: startsWith(github.ref, 'refs/tags') |