Implemented entities Evoker Fangs and Interaction #1429
Workflow file for this run
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: | |
pull_request: | |
branches: [ v1.* ] | |
push: | |
tags: [ v* ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Validate gradle wrapper | |
uses: gradle/wrapper-validation-action@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'temurin' | |
- name: Restore caches | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', 'gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*' ,'gradle-wrapper.properties') }} | |
${{ runner.os }}-gradle- | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build -x test --refresh-dependencies | |
- name: Run unit tests | |
run: ./gradlew test | |
- name: Store Private key | |
uses: DamianReeves/[email protected] | |
if: ${{ github.ref_type == 'tag' }} | |
with: | |
path: private.key | |
contents: ${{ secrets.PRIV_KEY }} | |
write-mode: overwrite | |
- name: Publish | |
if: ${{ github.ref_type == 'tag' }} | |
env: | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
SIGN_KEY: ${{ secrets.PRIV_KEY_PASS }} | |
run: | | |
mkdir -p $HOME/.gnupg | |
echo use-agent >> $HOME/.gnupg/gpg.conf | |
echo pinentry-mode loopback >> $HOME/.gnupg/gpg.conf | |
echo allow-loopback-pinentry >> $HOME/.gnupg/gpg-agent.conf | |
gpg --batch --import private.key | |
gpg --batch --export-secret-keys --passphrase $SIGN_KEY "Sebastiaan de Schaetzen <[email protected]>" > private.gpg | |
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository \ | |
-Pmockbukkit.version=$(echo ${{ github.ref_name }} | sed -e 's:v::') \ | |
-PossrhUsername=Iu0XBMzI \ | |
-PossrhPassword=$OSSRH_PASSWORD \ | |
-Psigning.secretKeyRingFile=private.gpg \ | |
-Psigning.keyId=${{ secrets.PRIV_KEY_ID }} \ | |
-Psigning.password=$SIGN_KEY |