Skip to content

Commit 11e5685

Browse files
authored
Publish to PyPI in gh actions (#305)
- add publish.yml to automatically push new releases to PyPI - update sfeos to v3.2.0 **Description:** **PR Checklist:** - [x] Code is formatted and linted (run `pre-commit run --all-files`) - [x] Tests pass (run `make test`) - [x] Documentation has been updated to reflect changes, if applicable - [x] Changes are added to the changelog
1 parent bbbba05 commit 11e5685

File tree

7 files changed

+66
-5
lines changed

7 files changed

+66
-5
lines changed

.github/workflows/publish.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*" # Triggers when a tag like 'v3.2.0' is pushed
7+
8+
jobs:
9+
build-and-publish:
10+
name: Build and Publish Packages
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python 3.10
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.10"
20+
21+
- name: Install build dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
26+
- name: Build and publish stac-fastapi-core
27+
working-directory: stac_fastapi/core
28+
env:
29+
TWINE_USERNAME: "__token__"
30+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
31+
run: |
32+
# Build package
33+
python setup.py sdist bdist_wheel
34+
35+
# Publish to PyPI
36+
twine upload dist/*
37+
38+
- name: Build and publish stac-fastapi-elasticsearch
39+
working-directory: stac_fastapi/elasticsearch
40+
env:
41+
TWINE_USERNAME: "__token__"
42+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
43+
run: |
44+
# Build package
45+
python setup.py sdist bdist_wheel
46+
47+
# Publish to PyPI
48+
twine upload dist/*
49+
50+
- name: Build and publish stac-fastapi-opensearch
51+
working-directory: stac_fastapi/opensearch
52+
env:
53+
TWINE_USERNAME: "__token__"
54+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
55+
run: |
56+
# Build package
57+
python setup.py sdist bdist_wheel
58+
59+
# Publish to PyPI
60+
twine upload dist/*

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111

1212
- Added `datetime_frequency_interval` parameter for `datetime_frequency` aggregation. [#294](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/294)
1313
- Added rate limiting functionality with configurable limits using environment variable `STAC_FASTAPI_RATE_LIMIT`, example: `500/minute`. [#303](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/303)
14+
- Added publish.yml to automatically publish new releases to PyPI [#305](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/305)
1415

1516
### Changed
1617

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "3.1.0"
2+
__version__ = "3.2.0"

stac_fastapi/elasticsearch/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
desc = f.read()
77

88
install_requires = [
9-
"stac-fastapi.core==3.1.0",
9+
"stac-fastapi.core==3.2.0",
1010
"elasticsearch[async]==8.11.0",
1111
"elasticsearch-dsl==8.11.0",
1212
"uvicorn",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "3.1.0"
2+
__version__ = "3.2.0"

stac_fastapi/opensearch/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
desc = f.read()
77

88
install_requires = [
9-
"stac-fastapi.core==3.1.0",
9+
"stac-fastapi.core==3.2.0",
1010
"opensearch-py==2.4.2",
1111
"opensearch-py[async]==2.4.2",
1212
"uvicorn",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "3.1.0"
2+
__version__ = "3.2.0"

0 commit comments

Comments
 (0)