-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update: GH action workflow: (i) now uses ODK container, (ii) Had to change 'echo -en' to plain 'echo' due to some new incompatibility with new ODK environment, (iii) removed some comments; streamlined. - Update: Minor updates in a few files; code comments, codestyle, verbosity
- Loading branch information
Showing
6 changed files
with
19 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,48 +6,41 @@ name: Build and release | |
on: | ||
schedule: | ||
- cron: "0 0 * * 0" # weekly on Sunday at midnight | ||
# - cron: '0 0 * * *' # every day at midnight | ||
# - cron: "0 0 1 * *" # monthly | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_release: | ||
runs-on: ubuntu-latest | ||
container: obolibrary/odkfull:v1.4.1 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
- name: Install | ||
run: | | ||
python -m pip install --upgrade pip | ||
make install | ||
- name: Create .env file | ||
run: | | ||
echo -en "API_KEY=${{ secrets.API_KEY }}" > .env | ||
echo "API_KEY=${{ secrets.API_KEY }}" > .env | ||
- name: Get current time | ||
uses: josStorer/[email protected] | ||
id: current-time | ||
with: | ||
# format: YYYYMMDD-HH | ||
# utcOffset: "+08:00" | ||
format: YYYY-MM-DD | ||
- name: build | ||
run: make automated-release-artefacts -B | ||
# TODO: change to make all when fixed: https://github.com/monarch-initiative/omim/issues/92 | ||
run: | | ||
make automated-release-artefacts | ||
# make all | ||
|
||
|
||
- name: Release | ||
run: echo Uploading files as new release. | ||
# This one wouldn't work unless it was a tag and on-push. | ||
# uses: softprops/action-gh-release@v1 | ||
# - name: Release | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
# Apparently, GITHUB_TOKEN is auto-created: https://dev.to/github/the-githubtoken-in-github-actions-how-it-works-change-permissions-customizations-3cgp | ||
# ...even though I don't see it here: https://github.com/monarch-initiative/omim/settings/secrets/actions | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "${{ steps.current-time.outputs.formattedTime }}" | ||
# title: "My Title" | ||
title: "${{ steps.current-time.outputs.formattedTime }}" | ||
prerelease: false | ||
# TODO: include omim.sssom.tsv when fixed: https://github.com/monarch-initiative/omim/issues/92 | ||
files: | | ||
omim.ttl | ||
# omim.sssom.tsv |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
"""Configuration""" | ||
from pathlib import Path | ||
import yaml | ||
from dotenv import dotenv_values | ||
|
||
ROOT_DIR = Path(__file__).resolve().parent.parent | ||
DATA_DIR = ROOT_DIR / 'data' | ||
ENV_PATH = ROOT_DIR / '.env' | ||
|
||
with open(DATA_DIR / 'dipper/GLOBAL_TERMS.yaml') as file: | ||
GLOBAL_TERMS = yaml.safe_load(file) | ||
|
||
with open(DATA_DIR / 'dipper/curie_map.yaml') as file: | ||
CURIE_MAP = yaml.safe_load(file) | ||
|
||
config = dotenv_values(ROOT_DIR / '.env') | ||
CONFIG = dotenv_values(ENV_PATH) |
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
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
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