✨ 基于.metadata的项目自动配置 #148
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 Plugin | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'private*' | |
| paths: | |
| - 'loader/**' | |
| - 'build.gradle.kts' | |
| pull_request: | |
| paths: | |
| - 'loader/**' | |
| - 'build.gradle.kts' | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| - name: Build plugin | |
| run: ./gradlew buildPlugin | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ScriptAgent-beta-${{ github.run_number }}.jar | |
| path: build/libs/*.jar | |
| if-no-files-found: error | |
| retention-days: 30 |