changes for GXD curators #8
This file contains hidden or 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 release files | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - 'src/ontology/emapa-edit.obo' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: obolibrary/odkfull:v1.6 | |
| strategy: | |
| max-parallel: 1 | |
| steps: | |
| - name: Checkout master 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=-Xmx6G' prepare_release | |
| - name: Commit and push release files | |
| id: commit | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add -A | |
| if git diff --cached --quiet; then | |
| echo "Nothing new to commit" | |
| echo "committed=false" >> $GITHUB_OUTPUT | |
| else | |
| git commit -m "Update release files" | |
| git push | |
| echo "committed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create tag | |
| if: steps.commit.outputs.committed == 'true' | |
| run: | | |
| TAG="v$(date +%Y-%m-%d)" | |
| git fetch --tags | |
| if git rev-parse "$TAG" >/dev/null 2>&1; then | |
| echo "Tag $TAG already exists, skipping" | |
| else | |
| git tag -a "$TAG" -m "Release $TAG" | |
| git push origin "$TAG" | |
| fi |