-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add validation and publishing actions
- Loading branch information
1 parent
975cae8
commit ec511d3
Showing
5 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: | ||
release: | ||
types: [created] | ||
|
||
name: Build ontology | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
environment: production | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- name: prepare single ttl file | ||
run: | | ||
sh validate.sh | ||
sh singleTTL.sh | ||
- name: Publish Asset | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: test | ||
files: graphit-ontology.ttl | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Validate ontology | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: validate ontology | ||
run: | | ||
./validate.sh |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
TTLFILE=graphit-ontology.ttl | ||
rm -f $TTLFILE | ||
|
||
|
||
find . -type f -name '*.ttl' -exec cat {} \; -exec echo $'\n' \;> TMP_cat_all.txt | ||
grep "@prefix" TMP_cat_all.txt | awk '{$1=$1}!A[toupper($0)]++' > TMP_prefixed.txt | ||
grep -v "@prefix" TMP_cat_all.txt > TMP_no_prefixes.txt | ||
cat TMP_prefixed.txt TMP_no_prefixes.txt > $TTLFILE | ||
rm TMP_prefixed.txt TMP_no_prefixes.txt TMP_cat_all.txt | ||
echo $TTLFILE 'has been generated.' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
find . -type f ! -name 'graphit-ontology.*' -name "*.ttl" | xargs java -jar bin/ogit-validator.jar |