Skip to content

Add fetch-depth

Add fetch-depth #20

Workflow file for this run

name: Build
on: [push]
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.caching=true -Dorg.gradle.welcome=never"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Gradle
uses: GeyserMC/actions/setup-gradle-composite@master
with:
setup-java_java-version: 17
checkout_fetch-depth: 0
- name: Build Base API
run: ./gradlew build
- name: Publish to Maven Repository
if: ${{ success() && github.repository == 'GeyserMC/api' }}
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }}
ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }}
- name: Get Version
if: ${{ github.repository == 'GeyserMC/api' }}
id: get-version
run: |
version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2)
echo "VERSION=${version}" >> $GITHUB_OUTPUT
- name: Get Release Metadata
if: ${{ github.repository == 'GeyserMC/api' }}
uses: GeyserMC/actions/release@master
id: metadata
with:
appID: ${{ secrets.RELEASE_APP_ID }}
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
releaseEnabled: false
releaseProject: 'base-api'
releaseVersion: ${{ steps.get-version.outputs.VERSION }}
- name: Notify Discords
if: ${{ github.repository == 'GeyserMC/api' }}
uses: GeyserMC/actions/notify-discord@master
with:
discordWebhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}
body: ${{ steps.metadata.outputs.body }}