Skip to content

Commit

Permalink
Add support for releasing specific recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorgadov committed Jul 22, 2024
1 parent 7025a56 commit cc928ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
type: string
required: true
description: "Version number"
only_recipes:
type: string
required: false
description: "Only recipes to release (comma separated, no spaces, e.g. 'recipe1,recipe2')"

jobs:
release:
Expand All @@ -23,7 +27,7 @@ jobs:
- name: Install python dependencies
run: pip install -r requirements.txt
- name: Run build
run: python build.py
run: python build.py ${{ github.event.inputs.only_recipes }}
- uses: ncipollo/release-action@v1
with:
name: "trajectory datasets"
Expand Down
4 changes: 4 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import logging
import sys
import zipfile
from pathlib import Path
from typing import Callable, List
Expand Down Expand Up @@ -100,8 +101,11 @@ def process_recipe(output_dir: Path, recipe_py_path: Path):


def main():
only_recipies = sys.argv[1].split(",") if len(sys.argv) > 1 else None
output_dir = Path("./builds")
for dataset_recipe in RECIPIES_DIR.glob("[!_]*.py"):
if dataset_recipe.stem not in only_recipies:
continue
try:
process_recipe(output_dir, dataset_recipe)
except AttributeError:
Expand Down

0 comments on commit cc928ed

Please sign in to comment.