diff --git a/.deploy/deploy.sh b/.deploy/deploy.sh deleted file mode 100755 index 3d92738..0000000 --- a/.deploy/deploy.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -set -ev -STATUS=`git log -1 --pretty=oneline` - -# Partially based on https://gist.github.com/domenic/ec8b0fc8ab45f39403dd - -SOURCE_BRANCH="master" -TARGET_BRANCH="gh-pages" - -# Save some useful information -REPO=`git config remote.origin.url` -SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:} -SHA=`git rev-parse --verify HEAD` -SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) - -echo $SSH_REPO - -# Clone the existing gh-pages for this repo into publish/ -# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deploy) -cd $SCRIPT_PATH -git clone $REPO publish -cd publish -git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH -cd .. - -# Clean out existing contents -rm -rf publish/**/* || exit 0 - -cd ${SCRIPT_PATH}/../build/doc -find . -name '*' -exec cp --parents {} ${SCRIPT_PATH}/publish/ \; -cd ${SCRIPT_PATH} - -# Now let's go have some fun with the cloned repo -cd publish -git init -git config user.name "Travis CI" -git config user.email "$COMMIT_AUTHOR_EMAIL" - -# Commit the "changes", i.e. the new version. -# The delta will show diffs between new and old versions. -git add -A . -git commit -m "Built by Travis-CI: $STATUS" -git status - - -# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc -ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" -ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" -ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} -ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} -openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ${SCRIPT_PATH}/deploy_key.enc -out ${SCRIPT_PATH}/deploy_key -d -chmod 600 ${SCRIPT_PATH}/deploy_key -eval `ssh-agent -s` -ssh-add ${SCRIPT_PATH}/deploy_key - -# Now that we're all set up, we can push. -git push $SSH_REPO $TARGET_BRANCH \ No newline at end of file diff --git a/.deploy/deploy_key.enc b/.deploy/deploy_key.enc deleted file mode 100644 index ada2d21..0000000 Binary files a/.deploy/deploy_key.enc and /dev/null differ diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..6aff19e --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,57 @@ +name: CD + +on: + release: + types: [published] + +jobs: + publish: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: 'gradle' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + + - name: Publish package + run: ./gradlew publish + env: + ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRHPASSWORD }} + ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRHUSERNAME }} + ORG_GRADLE_PROJECT_pgpSigningKey: ${{ secrets.PGPSIGNINGKEY }} + ORG_GRADLE_PROJECT_pgpSigningPassword: ${{ secrets.PGPSIGNINGPASSWORD }} + + - name: Generate Docs + run: ./gradlew generateDocs + + - name: Publish Spec + uses: actions/upload-pages-artifact@v1 + with: + path: build/docs + + deploy: + + needs: publish + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy Spec + id: deployment + uses: actions/deploy-pages@v1 + \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..971f6ef --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: 'gradle' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + + - name: Build with Gradle Wrapper + run: ./gradlew build \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7a7bae3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: java - -jdk: - - openjdk17 - -cache: - directories: - - $HOME/.gradle - -script: - - ./gradlew build generateDocs --refresh-dependencies - -env: - global: - - ENCRYPTION_LABEL: "e35fe261275e" - - COMMIT_AUTHOR_EMAIL: "melaasar@gmail.com" - -deploy: - - provider: script - script: .deploy/deploy.sh - skip_cleanup: true - on: - tags: true - branch: master - - provider: script - script: ./gradlew publish - skip_cleanup: true - on: - tags: true - branch: master diff --git a/README.md b/README.md index d656b99..21d10d5 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # IMCE Vocabularies -[![Build Status](https://app.travis-ci.com/opencaesar/imce-vocabularies.svg?branch=master)](https://app.travis-ci.com/github/opencaesar/imce-vocabularies) -[![Release](https://img.shields.io/github/v/tag/opencaesar/imce-vocabularies?label=release)](https://github.com/opencaesar/imce-vocabularies/releases/latest) -[![Documentation](https://img.shields.io/badge/Documentation-HTML-orange)](https://opencaesar.github.io/imce-vocabularies/) -[![Gitpod](https://img.shields.io/badge/gitpod-open-blue?logo=gitpod)](https://gitpod.io/#https://github.com/opencaesar/imce-vocabularies) +[![Build Status](https://github.com/opencaesar/imce-vocabularies/actions/workflows/ci.yml/badge.svg)](https://github.com/opencaesar/imce-vocabularies/actions/workflows/ci.yml) +[![Release](https://img.shields.io/github/v/release/opencaesar/imce-vocabularies?label=Release)](https://github.com/opencaesar/imce-vocabularies/releases/latest) +[![Documentation](https://img.shields.io/badge/Documentation-HTML-orange)](https://www.opencaesar.io/imce-vocabularies/) This is a set of IMCE vocabularies expressed in [OML](https://github.com/opencaesar/oml) diff --git a/build.gradle b/build.gradle index dd8ff0e..e701171 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ ext.title = "IMCE Vocabularies" description='The set of IMCE vocabularies' group = 'io.opencaesar.ontologies' -version = '5.0.0' +version = '5.1.0' apply from: "${rootDir}/gradle/maven-deployment.gradle" @@ -101,7 +101,7 @@ task generateDocs (type: io.opencaesar.owl.doc.OwlDocTask, dependsOn: owlReason) // OWL Ontology Iris inputOntologyIris = [ "$rootIri/classes", "$rootIri/properties", "$rootIri/individuals" ] // Output folder - outputFolderPath = file('build/doc') + outputFolderPath = file('build/docs') // Output case sensitivie path outputCaseSensitive = org.gradle.internal.os.OperatingSystem.current().isLinux() }