Merge pull request #70 from Meatwo310/forge-1.20.1-#69 #126
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 MOD Jar | |
| on: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| # リポジトリをチェックアウト | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| # JDK 17をセットアップ | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | |
| # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| # れっつびるど | |
| - name: Build with Gradle Wrapper | |
| run: ./gradlew build | |
| # 生成されたjarファイルを成果物としてアップロード | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: build/libs/ | |
| # タグがpushされたときにReleasesにアップロード | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') # タグがpushされたときのみ実行 | |
| with: | |
| generate_release_notes: true | |
| files: build/libs/*.jar |