1
0
mirror of https://github.com/GeyserMC/GeyserOptionalPack.git synced 2025-12-19 14:59:14 +00:00
Files
GeyserOptionalPack/.github/workflows/build.yml
LetsGoAway ddf7cbcf01 Java compiler for GeyserOptionalPack (#65)
* inital commit

* i think pr is ready now

* wait now its ready

* Update copyright year

* add license to each file

* Update pack version

* copy license / mojang disclaimer to pack

* Update mojang.md

* test actions

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update .gitignore

* clean up some code

* change "extracting" to copying

* Update build.yml

* Add new compilation instructions

* update developer documentation for new compiler

* make some code more readable

* some more code cleanup

* Code cleanup and tweaks

* Move to gradle action for running

* Cleanup run folder

* Update build action to use run folder

* Lets not bother with the run folder

* Download the specified version from mojang

* Remove old run folder

---------

Co-authored-by: rtm516 <ryantmilner@hotmail.co.uk>
2025-08-28 00:03:07 +01:00

62 lines
2.0 KiB
YAML

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