This repository was archived by the owner on Jul 22, 2026. It is now read-only.
update #4
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: | |
| - main | |
| - master | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build plugin | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| cache: maven | |
| - name: Build jar | |
| run: mvn -B package | |
| - name: Upload jar artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: craftengine-pack-gate | |
| path: target/*.jar | |
| if-no-files-found: error | |
| release: | |
| name: Create GitHub release | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download jar artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: craftengine-pack-gate | |
| path: dist | |
| - name: Create release and upload jar | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh release create "$GITHUB_REF_NAME" dist/*.jar --title "$GITHUB_REF_NAME" --generate-notes |