Fix initial saturation for new challenge joins #45
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: Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/gradle-build-action@v2 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Get short SHA | |
| id: shortsha | |
| run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Package | |
| path: build/libs | |
| - name: Create Release (Tagged) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: build/libs/*.jar | |
| generate_release_notes: true | |
| - name: Get current date and time | |
| id: datetime | |
| run: echo "datetime=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT | |
| - name: Generate UUID part | |
| id: uuid | |
| run: echo "uuid=$(uuidgen | cut -d'-' -f1)" >> $GITHUB_OUTPUT | |
| - name: Get version from gradle | |
| id: version | |
| run: echo "version=$(./gradlew properties -q | grep "version:" | awk '{print $2}' | sed 's/-SNAPSHOT//')" >> $GITHUB_OUTPUT | |
| - name: Create Snapshot Release | |
| if: github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: build/libs/*.jar | |
| name: v${{ steps.version.outputs.version }}_SNAPSHOT_${{ steps.datetime.outputs.datetime }}_${{ steps.uuid.outputs.uuid }} | |
| tag_name: v${{ steps.version.outputs.version }}_SNAPSHOT_${{ steps.datetime.outputs.datetime }}_${{ steps.uuid.outputs.uuid }} | |
| prerelease: true | |
| generate_release_notes: true |