Skip to content

Build and release

Build and release #42

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# About: actions/checkout@v2: Why needed for running code (makefile or not): https://stackoverflow.com/questions/66918575/how-to-use-your-own-makefile-in-github-actions
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
# container: obolibrary/odkfull:dev
container: obolibrary/odkfull:latest
steps:
- uses: actions/checkout@v2
# - name: Set up Python 3.10
# uses: actions/setup-python@v2
# with:
# python-version: '3.10'
- name: Install
# python -m pip install --upgrade pip
run: |
make install
- name: Create .env file
run: |
echo -en "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: |
echo -- ls before 2nd env create
ls
echo -en "API_KEY=${{ secrets.API_KEY }}" > .env
echo -- ls after 2nd env create
ls
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
- 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: "${{ steps.current-time.outputs.formattedTime }}"
prerelease: false
files: |
omim.ttl
omim.sssom.tsv