Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build dev package distributions

on:
pull_request:
branches:
- main
# types:
# - closed

jobs:
build:
# if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:

# we need to fetch the full repo history to use setuptools_scm
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.10.7"
python-version: "3.14"
enable-cache: true

- name: Sync dependencies
run: uv sync --all-extras --dev

- name: Build Python package
run: uv build

- name: Upload package distributions as artifact
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: |
dist/
!dist/.gitignore
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Push Release Tags

on:
push:
tags:
- '**'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
# we need to fetch the full repo history to use setuptools_scm
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.10.7"
python-version: "3.14"
enable-cache: true

- name: Sync dependencies
run: uv sync --all-extras --dev

- name: Build Python package
run: uv build

- name: Upload package distributions as artifact
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: |
dist/
!dist/.gitignore


pypi-publish:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/python-tind-client
permissions:
id-token: write
steps:
- uses: actions/checkout@v6

- name: Download built package distributions
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/

- name: Public package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[build-system]
requires = ["setuptools>=80"]
requires = ["setuptools>=80", "setuptools-scm[simple]>=9.2"]
build-backend = "setuptools.build_meta"

[project]
name = "python-tind-client"
version = "0.2.1"
dynamic = ["version"]
description = "Python library for interacting with the TIND DA API"
readme = "README.md"
license = { file = "LICENSE" }
license-files = ["LICENSE"]
authors = [
{ name = "Jason Raitz", email = "raitz@berkeley.edu" },
{ name = "maría a. matienzo", email = "matienzo@berkeley.edu" },
Expand Down Expand Up @@ -63,3 +63,4 @@ style = "sphinx"

[tool.pylint.format]
max-line-length = 100