Skip to content

[MAINT] add release workflow #4

[MAINT] add release workflow

[MAINT] add release workflow #4

# - 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'
if: ${{ github.event_name }} == 'release'
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