Upgrade actions and add project version extraction
Updated Gradle CI workflow to use newer action versions and added project version extraction step.
This commit is contained in:
27
.github/workflows/gradle.yml
vendored
27
.github/workflows/gradle.yml
vendored
@@ -1,10 +1,3 @@
|
|||||||
# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
|
||||||
|
|
||||||
name: Java CI with Gradle
|
name: Java CI with Gradle
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -20,10 +13,10 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Set up JDK 25
|
- name: Set up JDK 25
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v6
|
||||||
with:
|
with:
|
||||||
java-version: '25'
|
java-version: '25'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
@@ -37,10 +30,16 @@ jobs:
|
|||||||
- name: Build with Gradle Wrapper
|
- name: Build with Gradle Wrapper
|
||||||
run: ./tools/build-plugin.sh
|
run: ./tools/build-plugin.sh
|
||||||
|
|
||||||
|
- name: Extract Project Version
|
||||||
|
id: project_info
|
||||||
|
run: |
|
||||||
|
VERSION=$(./gradlew properties --no-daemon -q | awk -F ': ' '$1 == "version" {print $2}')
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Upload Plugin Artifact
|
- name: Upload Plugin Artifact
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: plugin-jar
|
name: ScoreKeeper-${{ steps.project_info.outputs.version }}
|
||||||
path: build/libs/*.jar
|
path: build/libs/*.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
@@ -51,10 +50,10 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Set up JDK 25
|
- name: Set up JDK 25
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v6
|
||||||
with:
|
with:
|
||||||
java-version: '25'
|
java-version: '25'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
@@ -66,3 +65,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v5
|
||||||
|
with:
|
||||||
|
include-configurations: '^(compileClasspath|runtimeClasspath)$'
|
||||||
|
|||||||
Reference in New Issue
Block a user