Skip to content

Commit a492d01

Browse files
author
Anita Caron
authored
Merge pull request #77 from obophenotype/report-release
Set up schedule job
2 parents c8ae911 + 5e6ce1a commit a492d01

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow weekly on Sundays at 6:54 am
6+
schedule:
7+
- cron: '54 6 * * 0'
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
13+
jobs:
14+
# This workflow contains a single job "report-release"
15+
report-release:
16+
# The type of runner that the job will run on
17+
runs-on: ubuntu-latest
18+
container: anitacaron/ccf-tools-dep
19+
20+
# Steps represent a sequence of tasks that will be executed as part of the job
21+
steps:
22+
- name: Get current date
23+
id: date
24+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -r requirements.txt
31+
- name: verify and build
32+
run: mkdir resources/ASCT-b_tables && cd src && make all
33+
- name: Commit report
34+
run: |
35+
git config --global user.name 'Anita Caron'
36+
git config --global user.email 'anitacaron@users.noreply.github.com'
37+
git commit -am "Automated report"
38+
git push
39+
- name: Release
40+
id: release-snapshot
41+
uses: actions/create-release@latest
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
tag_name: v${{ steps.date.outputs.date }}
46+
release_name: ${{ steps.date.outputs.date }}
47+
draft: false
48+
prerelease: false

0 commit comments

Comments
 (0)