Skip to content

Replace Component#appendNewLine with Component.append(Component.newli… #1034

Replace Component#appendNewLine with Component.append(Component.newli…

Replace Component#appendNewLine with Component.append(Component.newli… #1034

Workflow file for this run

name: Build Apollo
on: [ push ]
jobs:
build:
# Only run on PRs if the source branch is on someone else's repository.
if: "${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}"
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout from GitHub
uses: actions/checkout@v3
- name: Configure Google Cloud credentials
uses: google-github-actions/auth@v1
with:
workload_identity_provider: 'projects/271010089174/locations/global/workloadIdentityPools/github/providers/github-oidc'
service_account: '[email protected]'
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 8
- name: Setup BuildTools
run: |
mkdir ~/buildtools
cd ~/buildtools
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar
java -jar BuildTools.jar --rev 1.8.8
- name: Gradle Build
run: ./gradlew build
- name: Determine Version
run: echo "VERSION=$(./gradlew properties | awk '/^version:/ { print $2; }')" >> $GITHUB_ENV
- name: Determine Status
run: |
if [ "$(echo $VERSION | grep '\-SNAPSHOT')" ]; then
echo "STATUS=snapshot" >> $GITHUB_ENV
else
echo "STATUS=release" >> $GITHUB_ENV
fi
- name: Gradle Publish
if: "${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/version/') }}"
run: ./gradlew publish
- name: Gradle Release
if: "${{ (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/version/')) && env.STATUS == 'release' }}"
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
name: "Apollo v${{ env.VERSION }}"
tag_name: "v${{ env.VERSION }}"
target_commitish: "${{ github.sha }}"
generate_release_notes: true
files: |
bukkit/build/libs/apollo-bukkit-${{ env.VERSION }}.jar
bungee/build/libs/apollo-bungee-${{ env.VERSION }}.jar
velocity/build/libs/apollo-velocity-${{ env.VERSION }}.jar