v3.3.9 #97
Workflow file for this run
This file contains hidden or 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
name: Release | |
on: | |
release: | |
types: | |
- published | |
env: | |
DEFAULT_PYTHON: "3.13" | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build release assets | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Check out code from Github | |
uses: actions/checkout@v4.1.7 | |
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
id: python | |
uses: actions/setup-python@v5.1.1 | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
check-latest: true | |
- name: Install requirements | |
run: | | |
# Remove dist, build, and astroid.egg-info | |
# when building locally for testing! | |
python -m pip install build | |
- name: Build distributions | |
run: | | |
python -m build | |
- name: Upload release assets | |
uses: actions/upload-artifact@v4.6.1 | |
with: | |
name: release-assets | |
path: dist/ | |
release-pypi: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
needs: ["build"] | |
environment: | |
name: PyPI | |
url: https://pypi.org/project/astroid/ | |
permissions: | |
id-token: write | |
steps: | |
- name: Download release assets | |
uses: actions/download-artifact@v4.1.9 | |
with: | |
name: release-assets | |
path: dist/ | |
- name: Upload to PyPI | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
release-github: | |
name: Upload assets to Github release | |
runs-on: ubuntu-latest | |
needs: ["build"] | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Download release assets | |
uses: actions/download-artifact@v4.1.9 | |
with: | |
name: release-assets | |
path: dist/ | |
- name: Sign the dists with Sigstore and upload assets to Github release | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') | |
uses: sigstore/gh-action-sigstore-python@v3.0.0 | |
with: | |
inputs: | | |
./dist/*.tar.gz | |
./dist/*.whl |