Skip to content

Commit 6c2b6ae

Browse files
authored
Merge pull request #236 from stac-utils/publish-pypi
Publish to PyPI via gh actions
2 parents e918310 + d0f6699 commit 6c2b6ae

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*" # Triggers when a tag starting with 'v' followed by version numbers is pushed
7+
8+
jobs:
9+
build-and-publish:
10+
name: Build and Publish to PyPI
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 dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
26+
- name: Build package
27+
run: |
28+
python setup.py sdist bdist_wheel
29+
30+
- name: Publish package to PyPI
31+
env:
32+
TWINE_USERNAME: "__token__"
33+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
34+
run: |
35+
twine upload dist/*

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- Added publish.yml to automatically publish new releases to PyPI [#236](https://github.com/stac-utils/stac-validator/pull/236)
12+
913
## [v3.4.0] - 2024-10-08
1014

1115
### Added

0 commit comments

Comments
 (0)