-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fbe0ec
commit 9849251
Showing
5 changed files
with
63 additions
and
18 deletions.
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
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,39 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: '[2-9][0-9]\.[0-9][0-9]' | ||
jobs: | ||
create-release: | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
steps: | ||
- name: Build Changelog | ||
id: build-changelog | ||
uses: mikepenz/release-changelog-builder-action@v4 | ||
with: | ||
commitMode: true | ||
configurationJson: | | ||
{ | ||
"pr_template": "- #{{TITLE}}" | ||
} | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install -y raptor2-utils | ||
|
||
# don't validate here because there is a separate SHACL action and there are unvalidated parts of SNIK that would fail the release | ||
- name: Build | ||
run: ./scripts/combine | ||
|
||
- name: Create Release | ||
id: create-release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body: ${{steps.build-changelog.outputs.changelog}} | ||
files: | | ||
dist/snik.nt | ||
dist/snik.ttl |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*~ | ||
.* | ||
dist | ||
!.github |
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 |
---|---|---|
@@ -1,21 +1,19 @@ | ||
#/bin/sh | ||
# Combine all of SNIK into one file. | ||
# "source scripts/combine" in CI so GITHUB_STEP_SUMMARY gets exported | ||
|
||
MYPATH=`dirname "$0"` | ||
MYPATH=`( cd "$MYPATH" && pwd )` | ||
DISTPATH=$MYPATH/../dist | ||
mkdir -p $DISTPATH | ||
cat $MYPATH/../*.ttl $MYPATH/../*.nt | rapper -i turtle -o turtle - http://www.snik.eu/ontology/ > $DISTPATH/snik.ttl | ||
cd $DISTPATH | ||
GITHUB_STEP_SUMMARY="`wc -l snik.nt | cut -f1 -d ' '` triples \n\n" | ||
rapper -i turtle -o ntriples snik.ttl > snik.nt | ||
printf "`wc -l snik.nt | cut -f1 -d ' '` triples\n\n" | ||
if type awk > /dev/null 2>&1; then | ||
GITHUB_STEP_SUMMARY+="| Filename | bytes | KiB | MiB | KB | MB |\n" | ||
GITHUB_STEP_SUMMARY+="| -------- | ----- | --- | --- | -- | -- |\n" | ||
echo "| Filename | bytes | KiB | MiB | KB | MB |" | ||
echo "| -------- | ----- | --- | --- | -- | -- |" | ||
# "command ls" in case it is aliased to eza or something else, we need the exact ls output format | ||
GITHUB_STEP_SUMMARY+=`LC_ALL=C command ls -l snik.* | awk '{printf("|%10s |%10s |%9s |%9s |%9s |%9s |\n", $9, $5, $5/1024, $5/1024^2, $5/1000, $5/1000^2)}'` | ||
LC_ALL=C command ls -l snik.* | awk '{printf("|%10s |%10s |%9s |%9s |%9s |%9s |\n", $9, $5, $5/1024, $5/1024^2, $5/1000, $5/1000^2)}' | ||
else | ||
echo "awk is not installed, cannot generate summary table" | ||
fi | ||
|
||
printf "$GITHUB_STEP_SUMMARY" | ||
export GITHUB_STEP_SUMMARY | ||
cd .. |