40 lines
988 B
YAML
40 lines
988 B
YAML
name: Publish package
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
defaults:
|
|
run:
|
|
working-directory: keycloak-theme
|
|
jobs:
|
|
publish:
|
|
if: github.repository_owner == 'keycloak'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: Check out Admin UI
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Java
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: temurin
|
|
java-version: 11
|
|
check-latest: true
|
|
cache: maven
|
|
|
|
- name: Build Admin UI
|
|
run: mvn --batch-mode install
|
|
|
|
- name: Prune existing snapshots
|
|
uses: actions/delete-package-versions@v2
|
|
with:
|
|
package-name: org.keycloak.keycloak-admin-ui
|
|
num-old-versions-to-delete: 100
|
|
delete-only-pre-release-versions: true
|
|
|
|
- name: Publish Admin UI
|
|
run: mvn --batch-mode deploy -Dskip.npm
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|