Skip to content

Commit cf5e6c5

Browse files
committed
fix release workflow
1 parent aefce9e commit cf5e6c5

File tree

2 files changed

+70
-2
lines changed

2 files changed

+70
-2
lines changed

.github/workflows/release.yaml

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,36 @@ jobs:
8585
export IMAGE_TAGS="${IMAGE_RAW_TAGS//$'\n'/,}"
8686
if [[ $LATEST_TAG == "y" ]]; then export IMAGE_TAGS=$IMAGE_TAGS,ghcr.io/it-at-m/appswitcher-server:latest; fi
8787
mvn -B -ntp -DskipTests -P ci,build-image,publish verify
88+
89+
publish-native-image:
90+
needs: prepare-release
91+
runs-on: ubuntu-latest
92+
permissions:
93+
packages: write
94+
contents: write
95+
steps:
96+
- name: checkout release tag
97+
uses: actions/checkout@v4
98+
with:
99+
ref: ${{ github.event.inputs.release-tag }}
100+
- name: Set up JDK 17
101+
uses: actions/setup-java@v4
102+
with:
103+
java-version: "17"
104+
distribution: "temurin"
105+
cache: "maven"
106+
- name: Set up QEMU
107+
uses: docker/setup-qemu-action@v3
108+
- name: Set up Docker Buildx
109+
uses: docker/setup-buildx-action@v3
110+
- name: Extract metadata (tags, labels) for Docker
111+
id: meta
112+
uses: docker/metadata-action@v5
113+
with:
114+
images: ghcr.io/${{ github.repository }}-native
115+
tags: |
116+
type=raw,value=${{ github.event.inputs.release-version }}
117+
${{ (github.event.inputs.latest-image == 'y' && 'type=raw,value=latest') || '' }}
88118
- name: Build native image (default profile)
89119
env:
90120
IMAGE_NAME: ghcr.io/${{ github.repository }}-native
@@ -96,7 +126,37 @@ jobs:
96126
export IMAGE_TAGS="${IMAGE_RAW_TAGS//$'\n'/,}"
97127
if [[ $LATEST_TAG == "y" ]]; then export IMAGE_TAGS=$IMAGE_TAGS,$IMAGE_NAME:latest; fi
98128
mvn -B -ntp -DskipTests -P ci,native,build-native-image,publish verify
99-
- name: Build native image (keycloak profile)
129+
130+
publish-native-keycloak-image:
131+
needs: prepare-release
132+
runs-on: ubuntu-latest
133+
permissions:
134+
packages: write
135+
contents: write
136+
steps:
137+
- name: checkout release tag
138+
uses: actions/checkout@v4
139+
with:
140+
ref: ${{ github.event.inputs.release-tag }}
141+
- name: Set up JDK 17
142+
uses: actions/setup-java@v4
143+
with:
144+
java-version: "17"
145+
distribution: "temurin"
146+
cache: "maven"
147+
- name: Set up QEMU
148+
uses: docker/setup-qemu-action@v3
149+
- name: Set up Docker Buildx
150+
uses: docker/setup-buildx-action@v3
151+
- name: Extract metadata (tags, labels) for Docker
152+
id: meta
153+
uses: docker/metadata-action@v5
154+
with:
155+
images: ghcr.io/${{ github.repository }}-native-keycloak
156+
tags: |
157+
type=raw,value=${{ github.event.inputs.release-version }}
158+
${{ (github.event.inputs.latest-image == 'y' && 'type=raw,value=latest') || '' }}
159+
- name: Build native image (keycloak profile)
100160
env:
101161
IMAGE_NAME: ghcr.io/${{ github.repository }}-native-keycloak
102162
IMAGE_RAW_TAGS: ${{ steps.meta.outputs.tags }}
@@ -107,6 +167,14 @@ jobs:
107167
export IMAGE_TAGS="${IMAGE_RAW_TAGS//$'\n'/,}"
108168
if [[ $LATEST_TAG == "y" ]]; then export IMAGE_TAGS=$IMAGE_TAGS,$IMAGE_NAME:latest; fi
109169
mvn -B -ntp -DskipTests -P ci,keycloak,native,build-native-image,publish verify
170+
171+
github-release:
172+
needs: ["publish-image", "publish-native-image", "publish-native-keycloak-image"]
173+
runs-on: ubuntu-latest
174+
permissions:
175+
packages: write
176+
contents: write
177+
steps:
110178
- name: Create GitHub Release
111179
id: create_release
112180
uses: softprops/action-gh-release@v2

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</parent>
3434
<groupId>de.muenchen.oss.appswitcher</groupId>
3535
<artifactId>appswitcher-server</artifactId>
36-
<version>1.3.1-SNAPSHOT</version>
36+
<version>1.2.4-SNAPSHOT</version>
3737
<name>appswitcher-server</name>
3838
<description>Server component for a Google-like app switching experience</description>
3939
<properties>

0 commit comments

Comments
 (0)