-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update pyproject.toml for use with pypi This changeset makes a few fixes and updates to pyproject.toml as we work towards releasing Cladetime on pypi. Mostly adds and revises metadata, and fixes a few directives that impact the build process. * Add a workflow for building and publishing to test PyPI Cladetime has been successfully published to test-pypi: https://test.pypi.org/project/cladetime/ This commit adds a workflow to automate publishing to test-pypi. Once this is hooked up, we can focus on what deployment to the real PyPI should look like (presumably we'd want to use a similar process to what Zhian set up for our R packages). * Bump cladetime version
- Loading branch information
Showing
2 changed files
with
83 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# .github/workflows/publish-pypi-test.yaml | ||
# uses trusted publishing to publish the package to TestPyPI as described here: | ||
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | ||
name: Publish to Test PyPI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Set up Python 🐍 | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Install uv 🌟 | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
version: ">=0.0.1" | ||
|
||
- name: Build package for distribution 🛠️ | ||
run: | | ||
uv build | ||
- name: Upload distribution packages 📤 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cladetime-package-distribution | ||
path: dist/ | ||
|
||
publish-to-testpypi: | ||
name: Publish Python distribution to TestPyPI | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi-test | ||
url: https://test.pypi.org/p/cladetime | ||
permissions: | ||
id-token: write # needed for trusted publishing (i.e., OIDC) | ||
|
||
steps: | ||
- name: Download distribution artifacts 📥 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: cladetime-package-distributions | ||
path: dist/ | ||
- name: Publish distribution to TestPyPI 🚀 | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters