Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/build-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,27 @@ jobs:
build-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'adopt'
distribution: 'temurin'
cache: gradle
cache-dependency-path: |
**/gradle-wrapper.properties
**/build.gradle
**/build.gradle.kts
**/settings.gradle
**/settings.gradle.kts
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
uses: gradle/wrapper-validation-action@v1
- name: Ensure gradlew is executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew clean build
run: ./gradlew --no-daemon clean build
- name: Cleanup Gradle Cache
if: always()
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
rm -f ~/.gradle/caches/modules-2/modules-2.lock || true
rm -f ~/.gradle/caches/modules-2/gc.properties || true
38 changes: 24 additions & 14 deletions .github/workflows/deploy-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,41 @@ jobs:
deploy-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'adopt'
distribution: 'temurin'
cache: gradle
cache-dependency-path: |
**/gradle-wrapper.properties
**/build.gradle
**/build.gradle.kts
**/settings.gradle
**/settings.gradle.kts
- name: decode key
env:
secringEncodingKey: ${{secrets.MC_SECRING_ENC_KEY}}
secringEncodingKey: ${{ secrets.MC_SECRING_ENC_KEY }}
run: gpg --quiet --batch --yes --decrypt --passphrase="$secringEncodingKey" --output secring.gpg secring.gpg.gpgenc
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
uses: gradle/wrapper-validation-action@v1
- name: Ensure gradlew is executable
run: chmod +x ./gradlew
- name: deploy
env:
repositoryUrl: ${{secrets.MC_REPOSITORY_URL}}
repositoryUser: ${{secrets.MC_REPOSITORY_USER}}
repositoryPassword: ${{secrets.MC_REPOSITORY_PASSWORD}}
signingKeyId: ${{secrets.MC_SIGNING_KEY_ID}}
signingPassword: ${{secrets.MC_SIGNING_PASSWORD}}
run: ./gradlew -PsigningSecretKeyRingFile="`pwd`/secring.gpg" -Dorg.gradle.internal.publish.checksums.insecure=true --info clean build publishToSonatype closeAndReleaseRepository
repositoryUrl: ${{ secrets.MC_REPOSITORY_URL }}
repositoryUser: ${{ secrets.MC_REPOSITORY_USER }}
repositoryPassword: ${{ secrets.MC_REPOSITORY_PASSWORD }}
signingKeyId: ${{ secrets.MC_SIGNING_KEY_ID }}
signingPassword: ${{ secrets.MC_SIGNING_PASSWORD }}
run: ./gradlew --no-daemon -PsigningSecretKeyRingFile="$(pwd)/secring.gpg" -Dorg.gradle.internal.publish.checksums.insecure=true --info clean build publishToSonatype closeAndReleaseRepository
- name: Cleanup Gradle Cache
if: always()
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
rm -f ~/.gradle/caches/modules-2/modules-2.lock || true
rm -f ~/.gradle/caches/modules-2/gc.properties || true
- name: Cleanup
if: always()
run: |
rm secring.gpg
rm -f secring.gpg || true
Loading