mirror of
https://github.com/GeyserMC/GeyserOptionalPack.git
synced 2025-12-19 14:59:14 +00:00
62 lines
2.1 KiB
YAML
62 lines
2.1 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: GeyserIntegratedPack
|
|
path: GeyserIntegratedPack.mcpack
|
|
|
|
- name: Get Version
|
|
if: ${{ success() && github.repository == 'GeyserMC/GeyserIntegratedPack' && github.ref_name == 'master' }}
|
|
id: get-version
|
|
run: |
|
|
version=$(cat src/main/resources/integratedpack/manifest.json | jq -r '.header.version | join(".")')
|
|
echo "VERSION=${version}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Get Release Metadata
|
|
if: ${{ success() && github.repository == 'GeyserMC/GeyserIntegratedPack' && github.ref_name == 'master' }}
|
|
uses: GeyserMC/actions/release@master
|
|
id: metadata
|
|
with:
|
|
appID: ${{ secrets.RELEASE_APP_ID }}
|
|
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
|
|
files: |
|
|
geyserintegratedpack:GeyserIntegratedPack.mcpack
|
|
releaseEnabled: false
|
|
saveMetadata: true
|
|
releaseProject: 'geyserintegratedpack'
|
|
releaseVersion: ${{ steps.get-version.outputs.VERSION }}
|
|
|
|
- name: Publish to Downloads API
|
|
if: ${{ success() && github.repository == 'GeyserMC/GeyserIntegratedPack' && 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: |
|
|
GeyserIntegratedPack.mcpack
|