Update README.md

This commit is contained in:
Joseph Garrone 2023-12-01 23:25:33 +01:00 committed by GitHub
parent 2bb5678eb5
commit 36c6bb7f11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,70 +153,61 @@ on:
jobs: jobs:
build: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event.head_commit.author.name != 'actions'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.3 - uses: actions/setup-node@v2
with:
node-version: '16'
- uses: bahmutov/npm-install@v1 - uses: bahmutov/npm-install@v1
- run: yarn build - run: yarn build
- run: npx keycloakify - run: npx keycloakify
- uses: actions/upload-artifact@v2 env:
with: XDG_CACHE_HOME: "/home/runner/.cache/yarn"
name: standalone_keycloak_theme
path: build_keycloak/target/*keycloak-theme*.jar
- uses: actions/upload-artifact@v2
with:
name: build
path: build
check_if_version_upgraded: check_if_version_upgraded:
name: Check if version upgrade name: Check if version upgrade
if: github.event_name == 'push'
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: test
outputs: outputs:
from_version: \${{ steps.step1.outputs.from_version }} from_version: ${{ steps.step1.outputs.from_version }}
to_version: \${{ steps.step1.outputs.to_version }} to_version: ${{ steps.step1.outputs.to_version }}
is_upgraded_version: \${{ steps.step1.outputs.is_upgraded_version }} is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
steps: steps:
- uses: garronej/ts-ci@v2.1.0 - uses: garronej/ts-ci@v2.1.0
id: step1 id: step1
with: with:
action_name: is_package_json_version_upgraded action_name: is_package_json_version_upgraded
branch: ${{ github.head_ref || github.ref }}
create_github_release: create_github_release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs: check_if_version_upgraded
- check_if_version_upgraded
# We create a release only if the version have been upgraded and we are on a default branch # 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'
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: steps:
- run: mkdir jars - uses: actions/checkout@v2
- uses: actions/download-artifact@v2 - uses: actions/setup-node@v2
with: - uses: bahmutov/npm-install@v1
name: standalone_keycloak_theme - run: yarn build
- run: mv *keycloak-theme*.jar jars/standalone-keycloak-theme.jar - run: npx keycloakify
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"
- run: mv build_keycloak/target/retrocompat-*.jar retrocompat-keycloak-theme.jar
- run: mv build_keycloak/target/*.jar keycloak-theme.jar
- uses: softprops/action-gh-release@v1 - uses: softprops/action-gh-release@v1
with: with:
name: Release v\${{ needs.check_if_version_upgraded.outputs.to_version }} name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
tag_name: 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 }} target_commitish: ${{ github.head_ref || github.ref }}
generate_release_notes: true generate_release_notes: true
files: |
jars/standalone-keycloak-theme.jar
draft: false draft: false
prerelease: \${{ needs.check_if_version_upgraded.outputs.is_release_beta == 'true' }} files: |
retrocompat-keycloak-theme.jar
keycloak-theme.jar
env: env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EOF EOF
``` ```