[ANY] Update modules #1364
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: push | |
| on: push | |
| jobs: | |
| launcher: | |
| name: Launcher | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/caches | |
| key: gravit-${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}-launcher | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Generate and submit dependency graph | |
| uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 | |
| - name: Create artifacts | |
| run: | | |
| mkdir -p artifacts | |
| cp components/launchserver/build/distributions/launchserver*.zip artifacts/LaunchServerBuild.zip | |
| cp components/serverwrapper/build/libs/serverwrapper*-all.jar artifacts/ServerWrapper.jar | |
| cp components/serverwrapper/build/libs/serverwrapper*-inline.jar artifacts/ServerWrapperInline.jar | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Launcher | |
| path: artifacts | |
| - name: Get version value, set to env | |
| if: startsWith(github.event.ref, 'refs/tags') | |
| run: echo "LAUNCHER_VERSION=$(echo ${{ github.event.ref }} | awk -F\/ '{print $3}')" >> $GITHUB_ENV | |
| - name: Prebuild release files | |
| if: startsWith(github.event.ref, 'refs/tags') | |
| run: | | |
| cd artifacts | |
| - name: Create release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.event.ref, 'refs/tags') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Список настроек тута: https://github.com/softprops/action-gh-release#-customizing | |
| # Можно сделать пуш описания релиза из файла | |
| with: | |
| name: GravitLauncher ${{ env.LAUNCHER_VERSION }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| artifacts/* |