Update banner #22
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 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| release: | |
| types: | |
| - created | |
| jobs: | |
| build: | |
| if: github.event_name != 'release' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5.0.0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5.0.0 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Build with Gradle | |
| run: ./gradlew clean build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: Cardea | |
| path: build/libs | |
| publish: | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5.0.0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5.0.0 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Build artifact | |
| run: ./gradlew clean build | |
| - name: Export LATEST_TAG | |
| run: | | |
| echo "LATEST_TAG=$(curl -qsSL \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| "${{ github.api_url }}/repos/${{ github.repository }}/releases/latest" \ | |
| | jq -r .tag_name)" >> $GITHUB_ENV | |
| - name: Upload Release Artifact | |
| env: | |
| GH_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
| run: | |
| gh release upload ${{ env.LATEST_TAG }} build/libs/*.jar |