Skip to content

Instantly share code, notes, and snippets.

@takezoe
Last active January 23, 2021 16:16
Show Gist options
  • Save takezoe/89c94014a283998a4fa6be7c45d6a84d to your computer and use it in GitHub Desktop.
Save takezoe/89c94014a283998a4fa6be7c45d6a84d to your computer and use it in GitHub Desktop.
GitHub Actions configuration for GitBucket plugins
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
steps:
- uses: actions/checkout@v2
- name: Cache
uses: actions/cache@v2
env:
cache-name: cache-sbt-libs
with:
path: |
~/.ivy2/cache
~/.sbt
~/.coursier
key: build-${{ env.cache-name }}-${{ hashFiles('build.sbt') }}
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Run tests
run: |
git clone https://github.com/gitbucket/gitbucket.git
cd gitbucket
sbt publishLocal
cd ../
sbt test
- name: Assembly
run: sbt assembly
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts-java${{ matrix.java }}-${{ github.sha }}
path: ./target/scala-2.13/*.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment