Skip to content

chore(release): version 0.1.10 #7

chore(release): version 0.1.10

chore(release): version 0.1.10 #7

Workflow file for this run

name: Publish AeroViz
on:
push:
tags:
- 'v*'
jobs:
build-and-test:
strategy:
matrix:
python-version: [ "3.11", "3.12" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build
pip install -e .
pip install -e ".[test]"
- name: Run tests
run: |
pytest tests/ -m "not requires_data"
- name: Verify package version matches tag
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v}
PACKAGE_VERSION=$(python setup.py --version)
if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
echo "Version mismatch:"
echo " - Tag version: $TAG_VERSION"
echo " - Package version: $PACKAGE_VERSION"
exit 1
else
echo "Version match: $TAG_VERSION"
fi
- name: Build package
run: python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-${{ matrix.python-version }}
path: dist/
publish-test:
needs: build-and-test
runs-on: ubuntu-latest
environment:
name: test-pypi
url: https://test.pypi.org/p/AeroViz
permissions:
id-token: write
steps:
# Download artifacts from Python 3.12 build only
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions-3.12
path: dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
publish-prod:
needs: publish-test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/AeroViz
permissions:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions-3.12
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: Create GitHub Release
needs: publish-prod
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions-3.12
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v2.1.1
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes "Release ${{ github.ref_name }}"
- name: Upload artifacts to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'