Skip to content

Update settings.gradle #122

Update settings.gradle

Update settings.gradle #122

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: CI
on:
push:
branches: [ "1.16", "1.18", "1.19", "1.20" ]
paths:
- 'src/**'
- 'test/**'
- build.gradle
- gradle.properties
- settings.gradle
- .build-trigger
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: get_java_version
run: |
echo "java_version=$(cat .java-version | cut -d. -f1)" >> $GITHUB_OUTPUT
- name: Set up JDK ${{ steps.get_java_version.outputs.java_version || '17' }}
uses: actions/setup-java@v2
with:
java-version: ${{ steps.get_java_version.outputs.java_version || '17' }}
distribution: 'temurin'
- id: get_last_version
name: Get last version
run: |
echo "latest_version=$(cat .release-info/${{ github.ref_name }}/VERSION)" >> $GITHUB_ENV
- id: bump_version
name: Bump version
uses: cbrgm/semver-bump-action@main
with:
current-version: ${{ env.latest_version }}
bump-level: patch
- name: Build with Gradle
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: build test --scans
env:
CATHERDER_VERSION: "${{ steps.bump_version.outputs.new_version }}"
- name: Commit version file
run: |
git config --global user.email "[email protected]"
git config --global user.name "SweetRPG CI"
echo "${{ steps.bump_version.outputs.new_version }}" > .release-info/${{ github.ref_name }}/VERSION
git add .release-info/${{ github.ref_name }}/VERSION
git commit -m "Update ${{ github.ref_name }} VERSION file"
git push origin
- name: Release artifacts
uses: softprops/action-gh-release@v1
with:
tag_name: "${{ github.ref_name }}-${{ steps.bump_version.outputs.new_version }}"
prerelease: true
files: |
build/libs/*.jar