Merge pull request #102 from medizininformatik-initiative/renovate/ju… #296
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- v2 | |
pull_request: | |
branches: | |
- main | |
- v2 | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Cache Local Maven Repo | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: maven-${{ hashFiles('pom.xml') }} | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: java | |
queries: security-and-quality | |
- name: Build | |
run: mvn -B verify | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
release: | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Release | |
uses: qcastel/[email protected] | |
with: | |
release-branch-name: "main" | |
access-token: ${{ secrets.GITHUB_TOKEN }} | |
maven-args: "-DskipTests -DskipITs" | |
maven-repo-server-id: github | |
maven-repo-server-username: ${{ github.actor }} | |
maven-repo-server-password: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
JAVA_HOME: /usr/lib/jvm/java-17-openjdk/ | |
release-v2: | |
needs: build | |
if: github.ref == 'refs/heads/v2' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Release | |
uses: qcastel/[email protected] | |
with: | |
release-branch-name: "v2" | |
version-patch: false | |
access-token: ${{ secrets.GITHUB_TOKEN }} | |
maven-args: "-DskipTests -DskipITs" | |
maven-repo-server-id: github | |
maven-repo-server-username: ${{ github.actor }} | |
maven-repo-server-password: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
JAVA_HOME: /usr/lib/jvm/java-17-openjdk/ |