Map Party timelimit command improvements #258
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: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - dev | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: setup | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| # Configures gradle with caching | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| # Run "gradlew publish" for origin/dev and "gradlew build" for PRs or elsewhere | |
| - name: Execute Gradle ${{ (github.repository == 'PGMDev/Community' && github.ref == 'refs/heads/dev') && 'Publish' || 'Build' }} | |
| run: ./gradlew ${{ (github.repository == 'PGMDev/Community' && github.ref == 'refs/heads/dev') && 'publish' || 'build' }} | |
| env: | |
| GITHUB_TOKEN: ${{ (github.repository == 'PGMDev/Community' && github.ref == 'refs/heads/dev') && secrets.GITHUB_TOKEN || '' }} | |
| - name: artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Community.jar | |
| path: build/libs/Community.jar | |
| if-no-files-found: error | |
| - name: release vars | |
| if: github.repository == 'PGMDev/Community' && github.ref == 'refs/heads/dev' | |
| run: echo "sha_short=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" | |
| id: release_vars | |
| - name: release | |
| if: github.repository == 'PGMDev/Community' && github.ref == 'refs/heads/dev' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: dev-${{ steps.release_vars.outputs.sha_short }} | |
| name: Dev build ${{ steps.release_vars.outputs.sha_short }} | |
| prerelease: true | |
| files: build/libs/Community.jar |