Update .forgejo/workflows/build.yaml
Some checks are pending
Compile Gradle Project / Build Project (push) Waiting to run
Some checks are pending
Compile Gradle Project / Build Project (push) Waiting to run
This commit is contained in:
parent
c30662bc0a
commit
d8d26300f5
1 changed files with 34 additions and 34 deletions
|
@ -1,42 +1,42 @@
|
||||||
name: Build&Release
|
name: Compile Gradle Project
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
build_and_release:
|
Build Project:
|
||||||
runs-on: ubuntu
|
runs-on: ubuntu-24.04
|
||||||
|
env:
|
||||||
|
VERSION: ${{ github.ref_name }}
|
||||||
|
RELEASE_VERSION: ${{ github.ref_name }}
|
||||||
|
SNAPSHOT: ${{ endsWith(github.ref_name, '-snapshot') || contains(github.event.head_commit.message, '[snapshot]') }}
|
||||||
|
MAVEN_PUBLISHING_URL: ${{ vars.MAVEN_PUBLISHING_URL || 'https://nexus.gtnewhorizons.com/repository/releases/' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install JDK 21
|
- name: Checkout mod repo
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
apt update
|
|
||||||
apt install -y openjdk-21-jdk
|
|
||||||
java -version
|
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: https://data.forgejo.org/actions/checkout@v2
|
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.sha }}
|
fetch-depth: 32
|
||||||
|
|
||||||
|
- name: Set up JDK versions
|
||||||
|
uses: https://github.com/actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: |
|
||||||
|
8
|
||||||
|
17
|
||||||
|
21
|
||||||
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Setup Gradle
|
||||||
run: mvn clean install -DskipTests
|
uses: https://github.com/gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
build-scan-publish: true
|
||||||
|
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
|
||||||
|
build-scan-terms-of-use-agree: "yes"
|
||||||
|
validate-wrappers: true
|
||||||
|
|
||||||
- name: Run tests
|
- name: Grant execute permission for gradlew
|
||||||
run: mvn test
|
run: chmod +x gradlew
|
||||||
|
|
||||||
- name: Prepare release
|
- name: Setup the workspace
|
||||||
run: mvn release:prepare -DreleaseVersion=1.0.0 -DdevelopmentVersion=1.1.0-SNAPSHOT -DpushChanges=false
|
run: ./gradlew --build-cache --info --stacktrace ${{ inputs.workspace }}
|
||||||
|
|
||||||
- name: Perform release
|
- name: Compile the mod
|
||||||
run: mvn release:perform
|
run: ./gradlew --build-cache --info --stacktrace assemble
|
||||||
|
|
||||||
- name: Publish release (optional)
|
|
||||||
run: |
|
|
||||||
git tag v1.0.0
|
|
||||||
git push origin v1.0.0
|
|
Loading…
Add table
Add a link
Reference in a new issue