generated from keycloakify/keycloakify-starter
-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (50 loc) · 1.76 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: ci
on:
push:
branches:
- main
tags:
- "v*.*.*"
- "v*.*.*-alpha*"
- "v*.*.*-beta*"
pull_request:
branches:
- main
defaults:
run:
working-directory: ./src
jobs:
build:
runs-on: ubuntu-latest
if: github.event.head_commit.author.name != 'actions'
steps:
- uses: actions/checkout@v4
- name: Create version.txt
run: |
commit=$(git rev-parse --short HEAD)
if tag=$(git describe --tags --abbrev=0 2>/dev/null); then
printf "Tag: %s\nCommit: %s\n" "$tag" "$commit" > META-INF/version.txt
else
printf "Tag: none\nCommit: %s\n" "$commit" > META-INF/version.txt
fi
- name: Create two versions out of base theme
run: |
cp -r theme/keycloak-theme-world-direct-base theme/keycloak-theme-world-direct-without-forms-login
sed -i '/kcFormAdditionalClass=/c\kcFormAdditionalClass=displayNone' ./theme/keycloak-theme-world-direct-without-forms-login/login/theme.properties
mv theme/keycloak-theme-world-direct-base theme/keycloak-theme-world-direct
sed -i '/kcFormAdditionalClass/d' theme/keycloak-theme-world-direct/login/theme.properties
- name: Create jar artifact
run: |
zip -r keycloak-theme-world-direct.jar *
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: keycloak-theme-world-direct.jar
path: src/keycloak-theme-world-direct.jar
- name: Create Release when we a tag ref has been created
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: |
src/keycloak-theme-world-direct.jar