-
Notifications
You must be signed in to change notification settings - Fork 13
60 lines (54 loc) · 1.3 KB
/
python-cli.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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-*/*