-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from lukepolson/auto_pypi
Auto pushing to TestPypi
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 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,48 @@ | ||
name: Publish to TestPyPI | ||
|
||
on: | ||
workflow_run: | ||
workflows: [CI] | ||
types: | ||
- completed | ||
env: | ||
# Increase this to manually reset the conda environment cache | ||
YARDL_VERSION: 0.6.2 | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' # Adjust Python version as needed | ||
|
||
- name: Install required packages | ||
run: | | ||
pip install setuptools wheel twine build | ||
- name: Install yardl | ||
run: | | ||
YARDL_DIR=${{github.workspace}}/yardl | ||
mkdir ${YARDL_DIR} | ||
cd ${YARDL_DIR} | ||
echo "${{github.workspace}}/yardl" >> $GITHUB_PATH | ||
wget --quiet "https://github.com/microsoft/yardl/releases/download/v${YARDL_VERSION}/yardl_${YARDL_VERSION}_linux_x86_64.tar.gz" | ||
tar -xzf "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz" | ||
rm "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz" | ||
- name: Run yardl | ||
run: | | ||
cd model | ||
yardl generate | ||
- name: Publish to TestPyPI | ||
run: | | ||
cd python | ||
python -m build | ||
twine upload --repository-url https://test.pypi.org/legacy/ dist/* -u __token__ -p ${{ secrets.TEST_PYPI_TOKEN }} |
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,20 @@ | ||
[build-system] | ||
requires = ["setuptools>=42", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "petsird" | ||
version = "0.0.1" # Update as needed | ||
description = "Library and tools for working with PET Emission Tomography Standardization Initiative Raw Data (PETSIRD) data" | ||
readme = "README.md" | ||
authors = [{ name = "Kris Thielemans", email = "[email protected]" }] | ||
license = { text = "Apache-2.0" } | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"numpy>=1.22", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://etsinitiative.org/" | ||
Repository = "https://github.com/ETSInitiative/PETSIRD.git" | ||
Issues = "https://github.com/ETSInitiative/PETSIRD/issues" |