Merge pull request #1013 from mediathekview/feature/1005 #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Develop Pre-Release | |
on: | |
push: | |
branches: | |
- "develop" | |
jobs: | |
develop-pre-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
java-package: jdk+fx | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build and test | |
run: ./mvnw -B package docker:build -P docker | |
- name: SonarCloud Scan | |
run: ./mvnw -B org.jacoco:jacoco-maven-plugin:prepare-agent sonar:sonar -Dsonar.projectKey=mediathekview_MServer -Dsonar.organization=mediathekview -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Publish docker container | |
run: ./mvnw -B docker:push -P docker -DskipTests -Ddocker.username=$DOCKER_USERNAME -Ddocker.password=$DOCKER_PASSWORD | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Publish GitHub pre-Release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest-develop" | |
prerelease: true | |
title: "Development Build" | |
files: | | |
LICENSE.md | |
target/*.jar | |
target/*.tar.* | |
target/*.zip | |
target/classes/THIRD-PARTY.txt |