-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (61 loc) · 2.3 KB
/
buid_and_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# 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 pwd
pwd
echo -- ls before 2nd env create
ls -a
echo -en "API_KEY=${{ secrets.API_KEY }}" > .env
echo -- ls after 2nd env create
ls -a
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