[MAINT] add release workflow #1
Workflow file for this run
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
# - validate the protocol and activities in the repo with reproschema.py | |
# - triggers a release when a github release is published | |
name: validate and release | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: ['*'] | |
release: | |
types: [published] | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
# TODO This installs reproschema from source and not from pypi | |
# This may not be the optimal way of doing it. | |
run: | | |
python -m pip install --upgrade pip setuptools | |
pip install git+https://github.com/ReproNim/reproschema-py.git | |
- name: Validate content | |
run: | | |
python scripts/jsonParser.py | |
reproschema validate examples | |
release: | |
needs: [validate] | |
if: github.repository == 'ReproNim/reproschema' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Make a release | |
run: | | |
echo "Making a release" | |
# python scripts/makeRelease.py ci-release |