Skip to content

build: Bumping 1.6.0 -> 1.6.1 🔖 #21

build: Bumping 1.6.0 -> 1.6.1 🔖

build: Bumping 1.6.0 -> 1.6.1 🔖 #21

Workflow file for this run

name: Deploy package and documentation
on:
push:
tags:
- "*"
jobs:
build:
name: Universal Build 📦
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.12"]
outputs:
version: ${{ steps.package-version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Configure uv
uses: astral-sh/setup-uv@v5
- name: Install Python ${{ matrix.python }}
run: uv python install ${{ matrix.python }}
- name: Build package
run: |
uv build
- name: Extract package version
id: package-version
run: |
uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])" > VERSION
echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.python }}
path: dist/
publish-testpypi:
name: Publish Python 🐍 distribution 📦 to Test-PyPI
needs: build
runs-on: ubuntu-latest
environment:
name: release
permissions:
id-token: write
steps:
- name: "Install uv"
uses: astral-sh/setup-uv@v5
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Publish
run: |
ls -l
ls -l dist/
uv publish -v --publish-url https://test.pypi.org/legacy/ dist/*
verify-installation:
name: Cross-Platform 📦 validation from Test-PyPI
needs:
- build
- publish-testpypi
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
# - "ubuntu-22.04-arm64"
python-version:
- "3.10"
- "3.11"
- "3.12"
# - "3.13"
runs-on: ${{ matrix.os }}
steps:
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Waiting 10 seconds
run : sleep 10
- name: Install package from test-pypi
run: |
uv pip install -v --no-cache \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
--index-strategy unsafe-first-match \
geo-track-analyzer[cli]==$VERSION
env:
VERSION: ${{needs.build.outputs.version}}
- name: Run API and Worker script
run : |
enhance-elevation --help
publish-index:
name: Publish Python 🐍 distribution 📦 to PyPI
needs: verify-installation
runs-on: ubuntu-latest
environment:
name: release
permissions:
id-token: write
steps:
- name: "Install uv"
uses: astral-sh/setup-uv@v5
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Publish
run: |
ls -l
ls -l dist/
uv publish -v dist/*
publish-github:
name: GitHub release 🦾
runs-on: ubuntu-latest
needs: publish-pypi

Check failure on line 116 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy package and documentation

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 116, Col: 12): Job 'publish-github' depends on unknown job 'publish-pypi'. .github/workflows/deploy.yml (Line: 142, Col: 12): Job 'deploy-doc' depends on job 'publish-github' which creates a cycle in the dependency graph.
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Configure uv
uses: astral-sh/setup-uv@v5
- name: Install Python ${{ matrix.python }}
run: uv python install ${{ matrix.python }}
- name: Install git-changelog
run: uv tool install git-changelog
- name: Prepare release notes
run: git-changelog --release-notes > release-notes.md
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: release-notes.md
files: dist/*
deploy-doc:
name: Build and deploy documentation 📚
runs-on: ubuntu-latest
needs: publish-github
steps:
- uses: actions/checkout@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- name: Build the documentation
run: |
uv run python docs/dump_github_releases.py
uv run python docs/generate_visualization_examples.py
uv run --group doc mkdocs build
- uses: actions/upload-artifact@master
with:
name: DocumentationHTML
path: site/
- name: Commit documentation changes
run: |
git clone https://github.com/kschweiger/track_analyzer.git --branch gh-pages --single-branch gh-pages
cp -r site/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}