Skip to content

Commit

Permalink
Merge pull request #18 from world-direct/feature/freemarker
Browse files Browse the repository at this point in the history
Rewrite: freemarker template instead of keycloakify
  • Loading branch information
hwo-wd authored Jul 25, 2024
2 parents 65e3250 + f8f522b commit 910896f
Show file tree
Hide file tree
Showing 74 changed files with 5,111 additions and 18,992 deletions.
24 changes: 2 additions & 22 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,9 @@
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

/Dockerfile
/node_modules
/.github
/.vscode
/docs
/build
/build
tw
85 changes: 24 additions & 61 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,36 @@ on:
push:
branches:
- main
tags:
- "v*.*.*"
- "v*.*.*-alpha*"
- "v*.*.*-beta*"
pull_request:
branches:
- main

jobs:
defaults:
run:
working-directory: ./src

jobs:
build:
runs-on: ubuntu-latest
if: github.event.head_commit.author.name != 'actions'
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: '16'
- uses: bahmutov/npm-install@v1
- run: yarn build
- run: npx keycloakify
- uses: actions/upload-artifact@v2
with:
name: keycloak-theme-world-direct
path: build_keycloak/target/*keycloak-theme*.jar
- uses: actions/upload-artifact@v2
with:
name: build
path: build

check_if_version_upgraded:
name: Check if version upgrade
runs-on: ubuntu-latest
needs: build
outputs:
from_version: ${{ steps.step1.outputs.from_version }}
to_version: ${{ steps.step1.outputs.to_version }}
is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
steps:
- uses: garronej/[email protected]
id: step1
with:
action_name: is_package_json_version_upgraded

create_github_release:
runs-on: ubuntu-latest
needs:
- check_if_version_upgraded
# We create a release only if the version have been upgraded and we are on a default branch
# PR on the default branch can release beta but not real release
if: |
needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' &&
(
github.event_name == 'push' ||
needs.check_if_version_upgraded.outputs.is_release_beta == 'true'
)
steps:
- run: mkdir jars
- uses: actions/download-artifact@v2
with:
name: keycloak-theme-world-direct
- run: mv *keycloak-theme*.jar jars/keycloak-theme-world-direct.jar
- uses: softprops/action-gh-release@v1
with:
name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }}
target_commitish: ${{ github.head_ref || github.ref }}
generate_release_notes: true
files: |
jars/keycloak-theme-world-direct.jar
draft: false
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_release_beta == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- 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
47 changes: 0 additions & 47 deletions .gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions .storybook/main.js

This file was deleted.

13 changes: 0 additions & 13 deletions .storybook/preview.js

This file was deleted.

13 changes: 0 additions & 13 deletions Dockerfile

This file was deleted.

Loading

0 comments on commit 910896f

Please sign in to comment.