Implemented search in the servoy store #69
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Java CI with Maven and Pre-Release | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| tags: | |
| - 'v*.*.*-pre*' | |
| jobs: | |
| build_and_publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| cache-dependency-path: | | |
| **/pom.xml | |
| **/flush.txt | |
| - name: Build with Maven | |
| run: ./mvnw -U -B package | |
| working-directory: ./com.servoy.extensions.runtime.aiplugin | |
| - name: Get project version | |
| id: get_version | |
| run: echo "PACKAGE_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
| working-directory: ./com.servoy.extensions.runtime.aiplugin | |
| shell: bash | |
| - name: Get branch name | |
| run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
| - name: Check if release exists and is prerelease | |
| id: check_release | |
| run: | | |
| if gh release view "_${{ env.BRANCH_NAME }}" --json isPrerelease --jq '.isPrerelease'; then | |
| echo "release_exists=true" >> $GITHUB_ENV | |
| else | |
| echo "release_exists=false" >> $GITHUB_ENV | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Delete Prerelease release & Tag | |
| if: env.release_exists == 'true' | |
| run: | | |
| gh release delete _${{ env.BRANCH_NAME }} --cleanup-tag --yes | |
| while git fetch --tags --prune-tags; git tag -l | grep _${{ env.BRANCH_NAME }}; do | |
| sleep 2; | |
| printf "still waiting...\n" | |
| done | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create release | |
| run: | | |
| gh release create "_${{ github.ref_name }}" --target "${{ env.BRANCH_NAME }}" --prerelease --title "Nighlty Build ${{ env.BRANCH_NAME }}" --notes "Nightly build. Branch: ${{ env.BRANCH_NAME }} Commit: ${{ github.sha }} Package Version: ${{ env.PACKAGE_VERSION }}" | |
| echo "release_exists=true" >> $GITHUB_ENV | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload assets | |
| if: env.release_exists == 'true' | |
| run: | | |
| gh release upload "_${{ env.BRANCH_NAME }}" ./com.servoy.extensions.runtime.aiplugin/target/servoy-aiplugin.zip | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |