Skip to content

Release

Release #27

Workflow file for this run

---
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