Skip to content

Commit

Permalink
Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWatenbergScality committed Dec 26, 2023
1 parent 45d89e5 commit 861d462
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
actions: write

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
cache: "maven"
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: mvn -B clean package --file pom.xml
- name: Build and push CI image
uses: docker/[email protected]
with:
push: true
context: .
tags: ghcr.io/${{ github.repository }}/scality-keycloak:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target_commitish: ${{ github.sha }}
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: true
files: target/*.jar

0 comments on commit 861d462

Please sign in to comment.