mirror of
https://github.com/gotson/komga.git
synced 2025-12-27 11:00:24 +01:00
ci: setup CI workflow with github actions
This commit is contained in:
parent
7e988166ca
commit
a0e73b56d7
1 changed files with 60 additions and 0 deletions
60
.github/workflows/ci.yml
vendored
Normal file
60
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
name: CI
|
||||
|
||||
on: [ pull_request, push ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 8, 11 ]
|
||||
name: test jdk ${{ matrix.java }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
- name: Build
|
||||
run: ./gradlew build
|
||||
|
||||
webui:
|
||||
runs-on: ubuntu-latest
|
||||
name: test webui builds
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 8
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
- name: npmBuild
|
||||
run: ./gradlew npmBuild
|
||||
|
||||
release:
|
||||
name: semantic release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ test, webui ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 13.x
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 8
|
||||
- name: Install dependencies
|
||||
run: npm install --only=production
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: npx semantic-release
|
||||
Loading…
Reference in a new issue