Translated using Weblate (Chinese (Traditional Han script)) #249
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 Addons | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| release: | |
| types: [ created ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Set Up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: 21 | |
| distribution: adopt | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build Addons | |
| run: ./gradlew addonJar -PoutDir=../artifacts/ | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Artifacts | |
| path: ./artifacts/*.jar | |
| - name: Deploy to plugin repositories | |
| if: ${{ github.event_name == 'release' }} | |
| run: ./gradlew pluginPublish --githubReleaseId ${{ github.event.release.id }} | |
| env: | |
| GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} | |
| DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }} | |
| DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} | |
| MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
| HANGAR_API_KEY: ${{ secrets.HANGAR_API_KEY }} |