Skip to content

Commit

Permalink
Merge pull request #90 from rightsstatements/github-actions
Browse files Browse the repository at this point in the history
Migrate CI/release builds to GitHub Actions
  • Loading branch information
Mark A. Matienzo authored Nov 17, 2020
2 parents 403abda + b37e056 commit 2272213
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 19 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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: [email protected]
- name: Run tests
run: sbt test
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 2272213

Please sign in to comment.