diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d48990e --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/src/ontology/Makefile b/src/ontology/Makefile index 796a3b5..8f998eb 100644 --- a/src/ontology/Makefile +++ b/src/ontology/Makefile @@ -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" # ----------------------------------------