Skip to content

Commit

Permalink
upload publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhealy1 committed Oct 9, 2024
1 parent bbbba05 commit a2a8c4e
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish

on:
push:
tags:
- "v*.*.*" # Triggers when a tag like 'v3.2.0' is pushed

jobs:
build-and-publish:
name: Build and Publish Packages
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish stac-fastapi-core
working-directory: stac_fastapi/core
env:
TWINE_USERNAME: "__token__" # Hardcoded username for API token authentication
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # Your PyPI API token from GitHub Secrets
run: |
# Build package
python setup.py sdist bdist_wheel
# Publish to PyPI
twine upload dist/*
- name: Build and publish stac-fastapi-elasticsearch
working-directory: stac_fastapi/elasticsearch
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
# Build package
python setup.py sdist bdist_wheel
# Publish to PyPI
twine upload dist/*
- name: Build and publish stac-fastapi-opensearch
working-directory: stac_fastapi/opensearch
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
# Build package
python setup.py sdist bdist_wheel
# Publish to PyPI
twine upload dist/*

0 comments on commit a2a8c4e

Please sign in to comment.