diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..482d7c5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI build +on: push +jobs: + ci: + name: Build the rights application + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Checkout submodules + uses: textbook/git-checkout-submodule-action@master + - name: Cache ivy2 dependencies + uses: actions/cache@v2 + env: + cache-name: cache-ivy2 + with: + path: ~/.ivy2 + key: ${{ runner.os }}-ivy2-${{ hashFiles('**/build.sbt') }} + - name: Cache sbt dependencies + uses: actions/cache@v2 + env: + cache-name: cache-sbt + with: + path: ~/.sbt + key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.properties') }} + - name: Set up Scala + uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.8.0 + - name: Run tests + run: sbt test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..260362a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Create release +on: + push: + tags: + - 'v*' +jobs: + build: + name: Create release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Build rights application + run: sbt clean dist + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./target/universal/rights-app-dist.zip + asset_name: rights-app-dist.zip + asset_content_type: application/zip diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ea63967..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -dist: trusty -language: scala -scala: - - 2.11.11 -jdk: oraclejdk8 -sudo: false -cache: - directories: - - $HOME/.ivy2/cache -before_deploy: "sbt ++$TRAVIS_SCALA_VERSION clean dist" -deploy: - provider: releases - api_key: - secure: MijebRlWdyRf5oHgKkZ1Iv+afGwZaSWc0r/rcLK5GxuFawtghNumQS84mdr9No3LYR+2HsXCFfxivOWzMNoOb1pgPlh5sS99EazLW9smRkcPNy1TXBMzMOOxk8U5W1jQbfx2rZngdlT487KJuruvjl10srqAgAWlC2Znyo7jpXyuDUtWSBpBwuVVInIsbnwUl0vhavng0rISmSQIrDUWBTs/DFdhfVQVbzLXxPfN/2V2VpDU9KfR7ePK4AQBCyYtk+83rwiZFk0tMWNC4X0p3LLHhd8HzpYssDJJNQbl3vOzyU9X78ydYSRljrMOI3REPBWKumsn76UqnZzVKarpG7DuX5MYXiI3fbYX4QGzn9p4nEXRK+nJpOAf/he3bsh0TvgodaPLa1+WHtMzyn6mxQqh4FleSN+2knlASMVyvxVGzMaR4z8lTUGhSDJs0pk3353AYSZ3G1yLDnzOjlpIXkBJQfclEGY7C2a7F5WcgjnkQuTPsJCdmGtOsRtC8miK8kEuVmyVBwBbH2p1ItSuhGFjADeZ06hfkFHwozRA9fJBHcdCVggbkiqObFBZVxZt8NqTyyiZ34c5jHLMmdI0gueUjPJQr+S+xb8a7J5x1zyN5/hBFioVcXENiky7Ymd+vtlc7MRCkX6xVz9Zrg0oJMxTWZepnXUe8mIgv05Og1g= - file: "target/universal/rights-app-dist.zip" - skip_cleanup: true - on: - tags: true diff --git a/README.md b/README.md index 47b35c2..a97b9c9 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,6 @@ and visit [http://localhost:9000](http://localhost:9000). To incorporate updates or new translations, install [`tx`](https://docs.transifex.com/client/introduction), run [`tx pull`](https://docs.transifex.com/client/pull#command-options)` && for f in conf/messages_*.properties; do native2ascii $f $f; done` and commit the changes. For convenience, you can also execute `./updateI18n.sh` instead. If a new translation has been added, enable it by editing the `languages.available` key in `conf/application.conf`. -The new version needs to be tagged with git so that it gets recognized as a new release. +The new version needs to be tagged with git so that it gets recognized as a new release, using a tag that starts with `v` (e.g. `v1.2.7`). See also notes on implementing translations for the [data model](https://github.com/rightsstatements/data-model/blob/master/README.md) and the [website](https://github.com/rightsstatements/rightsstatements.github.io/blob/master/README.md) for more information.