diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000000..57c4fab3dd0 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,49 @@ +name: Publish build + +on: + workflow_dispatch: + inputs: + branch: + description: 'Branch to build' + required: true + default: 'master' + type: choice + options: + - master + - stable + releaseNotes: + description: 'Release notes' + required: true + default: 'No release notes provided' + type: string + +jobs: + publish: + name: Upload build + runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[ci skip]') == false + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} + + - name: Set up JDK 17 + uses: actions/setup-java@v3.13.0 + with: + distribution: 'adopt' + java-version: '17' + java-package: jdk + architecture: x64 + + - name: Build with Maven + run: mvn -B package + + - name: Upload to Blob Builds + uses: WalshyDev/blob-builds/gh-action@main + with: + project: Slimefun4 + releaseChannel: ${{ github.ref == 'refs/heads/stable' && 'RC' || 'Dev' }} + apiToken: ${{ secrets.BLOB_BUILDS_API_TOKEN }} + file: './target/Slimefun v4.9-UNOFFICIAL.jar' + releaseNotes: ${{ inputs.releaseNotes }}