Build Midas release files and create a release #17
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
name: Build Midas release files and create a release | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths: | |
- 'src/ontology/imports/**_import.owl' | |
- 'src/ontology/imports/seed.txt' | |
- 'src/ontology/midas-data-edit.owl' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: obolibrary/odkfull:v1.4 | |
strategy: | |
max-parallel: 1 | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Checkout main branch | |
uses: actions/checkout@v2 | |
- name: work around permission issue | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Update release files | |
run: cd src/ontology/ && make ROBOT_ENV='ROBOT_JAVA_ARGS=-Xmx8G' GITHUB_ACTION=true prepare_release -B | |
env: | |
TODAY: ${{ steps.date.outputs.date }} | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: matentzn | |
author_email: [email protected] | |
message: 'Update release files' | |
add: '*.owl' | |
tag: 'v${{ steps.date.outputs.date }} --force' | |
tag_push: '--force' | |
release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@main | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.date.outputs.date }} | |
release_name: Release ${{ steps.date.outputs.date }} | |
draft: false | |
prerelease: false |