diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 157d460..aca7293 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -4,7 +4,7 @@ on: push: branches: - main - workflow_dispatch: {} + workflow_dispatch: permissions: # Allow to publish github pages @@ -28,11 +28,6 @@ jobs: - name: Build run: ./gradlew build - - name: Deploy to gh pages 🚀 - if: github.ref == 'refs/heads/main' - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: dist/ - name: Publish package if: github.ref == 'refs/heads/main' @@ -43,3 +38,10 @@ jobs: ORG_GRADLE_PROJECT_MAVEN_USERNAME: ${{ secrets.GITHUB_USERNAME }} ORG_GRADLE_PROJECT_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + - name: Build pages + run: ./gradlew buildPages + - name: Deploy to gh pages 🚀 + if: github.ref == 'refs/heads/main' + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist/ diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 6969ccf..06f32c3 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -1,6 +1,9 @@ name: Publish release -on: workflow_dispatch +on: + push: + tags: + - '*' permissions: packages: write diff --git a/README.md b/README.md index 94fc3e6..6bce8fa 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,42 @@ -![version](https://img.shields.io/github/v/release/springwolf/springwolf-asyncapi-ui) -![springwolf-ui](https://github.com/timonback/springwolf-asyncapi-ui/workflows/build-and-deploy/badge.svg) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) # Springwolf AsyncApi UI -##### AsyncApi Web UI for Springwolf +##### Use Springwolf with the [AsyncApi Initiative UI](https://github.com/asyncapi/asyncapi-react) -Demo: https://demo-asyncapi-ui.springwolf.timonback.de +Demo: https://timonback.github.io/springwolf-asyncapi-ui/ + +:warning: This project is a proof of concept to use a different ui for [springwolf](https://github.com/springwolf/springwolf-core). At this point, I do not plan to maintain this actively. But feel free to leave a message in case you find it useful or you have suggestions. ## Usage -Add the following dependencies: +Refer to the [springwolf](https://github.com/springwolf/springwolf-core) project for the general setup. + +Now, also add the following to your `build.gradle` file: ```groovy +repositories { + // ... + maven { + url "https://maven.pkg.github.com/timonback/springwolf-asyncapi-ui" + } +} + dependencies { + // One of the springwolf plugins is required to build the AsyncApi document (general setup) + implementation 'io.github.springwolf:springwolf-kafka:0.10.0' + + // Add the ui of this project runtimeOnly 'io.github.springwolf:springwolf-asyncapi-ui:0.1.0' } ``` -After starting the application, visit: `localhost:8080/springwolf/asyncapi-ui/index.html`. +After starting the spring application, visit: `localhost:8080/springwolf/asyncapi-ui/index.html`. ## Development -1. Run `npm run build_pages` +1. Run `npm run build_pages` (Uses asyncApi mock data) 2. Open `./dist/index.html` in your browser ## Release Releasing is done by running the gradle task `publish`. For local development, use `publishToMavenLocal`. -### Setup the signing keys - -If you do not have gpg keys yet, generate one with: `gpg --full-gen-key` You will need to set password. - -Use the following environment variables: -- ORG_GRADLE_PROJECT_SIGNINGKEY: Output of `gpg --armor --export-secret-key` -- ORG_GRADLE_PROJECT_SIGNINGPASSWORD: Password for the gpg key +The maven package is available on github packages. diff --git a/build.gradle b/build.gradle index 8385100..4d597ba 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,6 @@ plugins { id 'java' id 'com.github.node-gradle.node' version '3.5.1' - id 'signing' id 'maven-publish' }