Skip to content

chore(deps): update dependency gradle to v8.7 #352

chore(deps): update dependency gradle to v8.7

chore(deps): update dependency gradle to v8.7 #352

Workflow file for this run

name: Build
on:
push:
branches: [ "**" ]
tags-ignore: [ "**" ]
pull_request:
release:
types: [ released ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- name: Build Artifact
run: ./gradlew build
- name: Set up Artifact Upload
run: |
echo "CORE_ARTIFACT_PATH=$(./gradlew :distributor-core:getArtifactPath -q)" >> $GITHUB_ENV
echo "KOTLIN_ARTIFACT_PATH=$(./gradlew :distributor-kotlin:getArtifactPath -q)" >> $GITHUB_ENV
- name: Upload Artifact to Actions (Core)
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}
path: ${{ env.CORE_ARTIFACT_PATH }}
- name: Upload Artifact to Actions (Kotlin)
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}
path: ${{ env.KOTLIN_ARTIFACT_PATH }}
- name: Determine Status
run: |
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then
echo "STATUS=snapshot" >> $GITHUB_ENV
else
echo "STATUS=release" >> $GITHUB_ENV
fi
- name: Publish to Xpdustry
if: "${{ env.STATUS == 'release' || startsWith(github.ref, 'refs/heads/master') }}"
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_xpdustryUsername: "${{ secrets.XPDUSTRY_MAVEN_USERNAME }}"
ORG_GRADLE_PROJECT_xpdustryPassword: "${{ secrets.XPDUSTRY_MAVEN_PASSWORD }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_PASSWORD }}"
- name: Upload Artifact to Release (Core)
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
asset_name: distributor-core.jar
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.CORE_ARTIFACT_PATH }}
tag: ${{ github.ref }}
- name: Upload Artifact to Release (Kotlin)
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
asset_name: distributor-kotlin.jar
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.KOTLIN_ARTIFACT_PATH }}
tag: ${{ github.ref }}
- name: Update Changelog
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.tag_name }}
release-notes: ${{ github.event.release.body }}
- name: Commit Updated Changelog
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.event.release.target_commitish }}
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md