Skip to content

Python CLI

Python CLI #63

Workflow file for this run

name: Python CLI
on:
push:
tags:
- "stac-cli-*"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-wheels:
uses: ./.github/workflows/wheels.yml
with:
manifest-path: cli/Cargo.toml
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist --manifest-path cli/Cargo.toml
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: pypi_files_sdist
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: success() && startsWith(github.ref, 'refs/tags/')
needs:
- build-wheels
- sdist
environment:
name: pypi
url: https://pypi.org/p/stacrs-cli
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: pypi_files_*
merge-multiple: true
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*