Add fetch-depth #20
This file contains 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: [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 }} |