Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SCDO automatic release workflow #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run and deploy release
on:
workflow_dispatch:
# schedule:
# - cron: "0 0 1 * *"

jobs:
deploy:
runs-on: ubuntu-latest
container: obolibrary/odkfull:v1.5
steps:
- name: Checkout main branch
uses: actions/checkout@v3

- name: work around permission issue
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Update release files
run: cd src/ontology/ && make prepare_release -B

- name: Run release
uses: gaoDean/action-gh-release@6b61bb5648ddc1241deb73ea6b72c3a1e1f9e445
with:
generate_release_notes: true
draft: true
tag_name: v${{ steps.date.outputs.date }}
files: |
scdo.owl
scdo.obo
mappings/scdo-sssom-xrefs.tsv
10 changes: 5 additions & 5 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ all: sparql_test $(ONT).owl $(ONT).obo $(ONT)_hpo_merged.owl scdo_hp_bridge.owl
test: sparql_test all

prepare_release: all
cp $(ONT).owl scdo_hpo_merged.owl $(RELEASEDIR) &&\
mkdir -p $(RELEASEDIR)/imports $(RELEASEDIR)/mappings &&\
cp imports/*.owl $(RELEASEDIR)/imports &&\
cp mappings/*.tsv $(RELEASEDIR)/mappings &&\
git add $(RELEASEDIR)/imports/*.owl &&\
mkdir -p $(RELEASEDIR)/
cp $(ONT).owl scdo_hpo_merged.owl $(RELEASEDIR)
mkdir -p $(RELEASEDIR)/imports $(RELEASEDIR)/mappings
cp imports/*.owl $(RELEASEDIR)/imports
cp mappings/*.tsv $(RELEASEDIR)/mappings
echo "Release files are now in $(RELEASEDIR) - now you should commit, push and make a release on github"

# ----------------------------------------
Expand Down