GH-1147 Save User entity to database (#1147) #4140
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 Gradle | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: [17] | |
| fail-fast: false | |
| steps: | |
| - name: Find existing comment | |
| uses: peter-evans/find-comment@v4 | |
| if: github.event_name == 'pull_request' | |
| id: find-comment | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: 'github-actions[bot]' | |
| - name: Create progress comment if not exists | |
| uses: peter-evans/create-or-update-comment@v5 | |
| if: github.event_name == 'pull_request' && steps.find-comment.outputs.comment-id == '' | |
| id: create-comment | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| ### 🚧 Build in progress... | |
| > [!NOTE] | |
| > A new commit has been pushed. A development build of **EternalCore** will be available here once the workflow completes. | |
| edit-mode: replace | |
| - name: Update progress comment if exists | |
| uses: peter-evans/create-or-update-comment@v5 | |
| if: github.event_name == 'pull_request' && steps.find-comment.outputs.comment-id != '' | |
| id: update-comment | |
| with: | |
| comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| ### 🚧 Build in progress... | |
| > [!NOTE] | |
| > A new commit has been pushed. A development build of **EternalCore** will be available here once the workflow completes. | |
| edit-mode: replace | |
| - name: Set comment-id output | |
| id: comment | |
| run: | | |
| echo "comment-id=${{ steps.find-comment.outputs.comment-id != '' && steps.find-comment.outputs.comment-id || steps.create-comment.outputs.comment-id }}" >> $GITHUB_OUTPUT | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/[email protected] | |
| with: | |
| distribution: adopt | |
| java-version: ${{ matrix.java }} | |
| - name: Cache Gradle | |
| uses: actions/[email protected] | |
| with: | |
| path: ~/.gradle/caches | |
| key: >- | |
| ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: '${{ runner.os }}-gradle-' | |
| - name: Make gradlew executable | |
| run: chmod +x gradlew | |
| - name: Build the plugin | |
| run: ./gradlew clean eternalcore-plugin:shadowJar | |
| - name: Upload built JAR | |
| uses: actions/[email protected] | |
| id: upload-artifact | |
| with: | |
| name: EternalCore Dev Build | |
| path: eternalcore-plugin/build/libs/EternalCore*.jar | |
| retention-days: 14 | |
| overwrite: true | |
| - name: Update comment with download link | |
| uses: peter-evans/create-or-update-comment@v5 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| comment-id: ${{ steps.comment.outputs.comment-id }} | |
| body: | | |
| ### 📦 Development Build Ready | |
| > [!WARNING] | |
| > **Do not use this build in production.** It is for testing purposes only and may be unstable. | |
| 👉 [**Click here to download the JAR**](${{ steps.upload-artifact.outputs.artifact-url }}) | |
| edit-mode: replace | |
| reactions: rocket |