feat: QuickMoveとAntiCheatのロジックを改善 #2
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, push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: checkout repository | |
| uses: actions/checkout@v4 | |
| - name: validate gradle wrapper | |
| uses: gradle/actions/wrapper-validation@v4 | |
| - name: setup jdk | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'microsoft' | |
| - name: make gradle wrapper executable | |
| run: chmod +x ./gradlew | |
| - name: extract version from properties | |
| id: get_version | |
| # プロジェクトルートの gradle.properties から mod_version の値を抽出する | |
| run: | | |
| MOD_VERSION=$(grep 'mod_version' gradle.properties | cut -d '=' -f 2 | tr -d '[:space:]') | |
| if [ -z "$MOD_VERSION" ]; then | |
| echo "Error: mod_version not found or empty in gradle.properties" | |
| exit 1 | |
| fi | |
| echo "Detected Version: $MOD_VERSION" | |
| # GitHub Actionsの環境変数として設定 | |
| echo "RELEASE_VERSION=$MOD_VERSION" >> $GITHUB_ENV | |
| - name: build | |
| run: ./gradlew build | |
| - name: publish | |
| # プッシュイベントで、かつ現在のブランチが 'release' の場合にのみ実行 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/release' | |
| run: ./gradlew publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: create github release | |
| # プッシュイベントで、かつ現在のブランチが 'release' の場合にのみ実行 | |
| # 環境変数 RELEASE_VERSION を利用 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/release' | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| # バージョンの先頭に 'v' を付けることで、慣習的なタグ名とする | |
| tag_name: v${{ env.RELEASE_VERSION }} | |
| name: Release v${{ env.RELEASE_VERSION }} | |
| files: build/libs/*.jar | |
| - name: capture build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Artifacts | |
| path: build/libs/ |