Oops meant to keep this #21
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: | |
| workflow_dispatch: | |
| push: | |
| paths-ignore: | |
| - '.gitignore' | |
| - 'LICENSE' | |
| - 'README.md' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Gradle | |
| uses: GeyserMC/actions/setup-gradle-composite@master | |
| with: | |
| setup-java_java-version: 21 | |
| - name: Build and run with Gradle | |
| run: ./gradlew run | |
| - name: Archive resource pack artifact | |
| # See https://github.com/actions/upload-artifact/commits | |
| uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
| if: success() | |
| with: | |
| name: GeyserOptionalPack | |
| path: GeyserOptionalPack.mcpack | |
| - name: Get Version | |
| if: ${{ success() && github.repository == 'GeyserMC/GeyserOptionalPack' && github.ref_name == 'master' }} | |
| id: get-version | |
| run: | | |
| version=$(cat src/main/resources/optionalpack/manifest.json | jq -r '.header.version | join(".")') | |
| echo "VERSION=${version}" >> $GITHUB_OUTPUT | |
| - name: Get Release Metadata | |
| if: ${{ success() && github.repository == 'GeyserMC/GeyserOptionalPack' && github.ref_name == 'master' }} | |
| uses: GeyserMC/actions/release@master | |
| id: metadata | |
| with: | |
| appID: ${{ secrets.RELEASE_APP_ID }} | |
| appPrivateKey: ${{ secrets.RELEASE_APP_PK }} | |
| files: | | |
| geyseroptionalpack:GeyserOptionalPack.mcpack | |
| releaseEnabled: false | |
| saveMetadata: true | |
| releaseProject: 'geyseroptionalpack' | |
| releaseVersion: ${{ steps.get-version.outputs.VERSION }} | |
| - name: Publish to Downloads API | |
| if: ${{ success() && github.repository == 'GeyserMC/GeyserOptionalPack' && github.ref_name == 'master' }} | |
| uses: GeyserMC/actions/upload-release@master | |
| with: | |
| username: ${{ vars.DOWNLOADS_USERNAME }} | |
| privateKey: ${{ secrets.DOWNLOADS_PRIVATE_KEY }} | |
| host: ${{ secrets.DOWNLOADS_SERVER_IP }} | |
| files: | | |
| GeyserOptionalPack.mcpack |