Skip to content

fix: use public action #15

fix: use public action

fix: use public action #15

Workflow file for this run

name: Build Configurate
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@v4
with:
fetch-depth: 0 # checkout full history for site generation
submodules: recursive
- name: Setup Patcher
run: |
git config --global user.email "noreply@spongepowered.org"
git config --global user.name "github-actions"
- name: Configure Google Cloud credentials
uses: google-github-actions/auth@v3
with:
workload_identity_provider: 'projects/824216268633/locations/global/workloadIdentityPools/github-actions/providers/github-actions-oidc'
service_account: "github-actions@mw-lunarclient-cdn.iam.gserviceaccount.com"
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- name: Gradle Build
run: ./gradlew build
- name: Determine status
shell: bash
run: |
VERSION="$(./gradlew properties | awk '/^version:/ { print $2; }')"
if [ "$(echo $VERSION | grep '\-SNAPSHOT')" ]; then
echo "STATUS=snapshot" >> $GITHUB_ENV
else
echo "STATUS=release" >> $GITHUB_ENV
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Publish with Gradle
if: "${{ github.ref == 'refs/heads/lunar' }}"
run: ./gradlew publish