2021-05-08 00:43:55 +02:00
|
|
|
name: Build and release
|
2021-05-07 23:50:44 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
2021-05-08 00:12:38 +02:00
|
|
|
tags:
|
|
|
|
- 'v*.*.*'
|
2021-05-07 23:50:44 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 11
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- name: Cache maven repository
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
|
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-maven-
|
|
|
|
- name: Build with Maven
|
2021-05-08 00:52:07 +02:00
|
|
|
run: mvn -B clean deploy -s maven-github-settings.xml --file pom.xml
|
2021-05-08 00:06:46 +02:00
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
files: target/keycloak-restrict-client-auth.jar
|
|
|
|
body_path: RELEASELOG
|
|
|
|
draft: true
|
|
|
|
fail_on_unmatched_files: true
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|