Fix optional positional args for admin claim and pvp commands #38
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 and Release | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ master, main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Java 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '25-ea' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build with Maven | |
| run: mvn clean package | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: EasyClaims | |
| path: target/EasyClaims-*.jar | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: EasyClaims | |
| path: ./dist | |
| - name: Get short SHA | |
| id: sha | |
| run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
| - name: Get current date | |
| id: date | |
| run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
| - name: Set version | |
| id: version | |
| run: echo "VERSION=v1.0.${{ github.run_number }}" >> $GITHUB_OUTPUT | |
| - name: Get commit message | |
| id: commit | |
| run: | | |
| # Get the full commit message (subject + body) | |
| COMMIT_MSG=$(git log -1 --pretty=format:"%B") | |
| # Escape for GitHub Actions output | |
| COMMIT_MSG="${COMMIT_MSG//'%'/'%25'}" | |
| COMMIT_MSG="${COMMIT_MSG//$'\n'/'%0A'}" | |
| COMMIT_MSG="${COMMIT_MSG//$'\r'/'%0D'}" | |
| echo "MESSAGE<<EOF" >> $GITHUB_OUTPUT | |
| git log -1 --pretty=format:"%B" >> $GITHUB_OUTPUT | |
| echo "" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Rename JAR | |
| run: mv dist/EasyClaims-*.jar dist/EasyClaims-${{ steps.version.outputs.VERSION }}.jar | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.VERSION }} | |
| name: EasyClaims ${{ steps.version.outputs.VERSION }} | |
| body: | | |
| ## EasyClaims ${{ steps.version.outputs.VERSION }} | |
| **Commit:** `${{ steps.sha.outputs.SHORT_SHA }}` | |
| **Date:** ${{ steps.date.outputs.DATE }} | |
| ### What's Changed | |
| ${{ steps.commit.outputs.MESSAGE }} | |
| --- | |
| ### Installation | |
| 1. Download `EasyClaims-${{ steps.version.outputs.VERSION }}.jar` | |
| 2. Place in your Hytale server's `mods/` folder | |
| 3. Restart the server | |
| files: dist/EasyClaims-${{ steps.version.outputs.VERSION }}.jar | |
| prerelease: false | |
| make_latest: true |