Release #27
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: Release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
project-version: ${{ steps.project-version.outputs.project-version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 20 | |
distribution: 'temurin' | |
- name: Use cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ hashFiles('**/pom.xml') }} | |
- name: Determine version | |
id: project-version | |
run: echo "project-version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT | |
- name: Build | |
run: mvn --batch-mode clean package | |
- name: Create Checksum | |
run: | | |
sha256sum target/keycloak-ipaddress-authenticator-${{ steps.project-version.outputs.project-version }}.jar > keycloak-ipaddress-authenticator-${{ steps.project-version.outputs.project-version }}.jar.sha256 | |
sha256sum target/keycloak-ipaddress-authenticator-${{ steps.project-version.outputs.project-version }}-jar-with-dependencies.jar > keycloak-ipaddress-authenticator-${{ steps.project-version.outputs.project-version }}-jar-with-dependencies.jar.sha256 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: keycloak-ipaddress-authenticator | |
if-no-files-found: error | |
path: | | |
target/keycloak-ipaddress-authenticator-${{ steps.project-version.outputs.project-version }}.jar | |
target/keycloak-ipaddress-authenticator-${{ steps.project-version.outputs.project-version }}-jar-with-dependencies.jar | |
keycloak-ipaddress-authenticator-${{ steps.project-version.outputs.project-version }}.jar.sha256 | |
keycloak-ipaddress-authenticator-${{ steps.project-version.outputs.project-version }}-jar-with-dependencies.jar.sha256 | |
create_release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: [build] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
path: assets | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Release v${{ needs.build.outputs.project-version }} | |
tag_name: ${{ needs.build.outputs.project-version }} | |
draft: true | |
files: | | |
assets/keycloak-ipaddress-authenticator/target/keycloak-ipaddress-authenticator-*.jar | |
assets/keycloak-ipaddress-authenticator/keycloak-ipaddress-authenticator-*.jar.sha256 |