Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit 3bb7c24

Browse files
committed
Update publishing (again)
1 parent 10525ef commit 3bb7c24

File tree

4 files changed

+18
-25
lines changed

4 files changed

+18
-25
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,26 @@ on: [ pull_request, push ]
88

99
jobs:
1010
build:
11-
strategy:
12-
matrix:
13-
# Use these Java versions
14-
java: [ 17 ]
15-
# and run on both Linux and Windows
16-
os: [ ubuntu-20.04 ]
17-
runs-on: ${{ matrix.os }}
11+
runs-on: ubuntu-latest
1812
steps:
19-
- name: checkout repository
13+
- name: Checkout repository
2014
uses: actions/[email protected]
21-
- name: validate gradle wrapper
15+
- name: Validate Gradle wrapper
2216
uses: gradle/wrapper-validation-action@v1
23-
- name: setup jdk ${{ matrix.java }}
17+
- name: Setup JDK 17
2418
uses: actions/[email protected]
2519
with:
2620
distribution: 'temurin'
27-
java-version: ${{ matrix.java }}
28-
- name: make gradle wrapper executable
29-
if: ${{ runner.os != 'Windows' }}
21+
java-version: 17
22+
- name: Make Gradle wrapper executable
3023
run: chmod +x ./gradlew
31-
- name: build
24+
- name: Build
3225
run: ./gradlew build
33-
- name: Retrieve Version #https://stackoverflow.com/questions/71089787/how-to-get-version-name-from-android-gradle-file-in-github-actions
26+
- name: Retrieve version #https://stackoverflow.com/questions/71089787/how-to-get-version-name-from-android-gradle-file-in-github-actions
3427
run: |
3528
echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q printVersionName)" >> $GITHUB_ENV
3629
echo "GIT_HASH=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
37-
- name: capture build artifacts
30+
- name: Capture build artifacts
3831
uses: actions/[email protected]
3932
with:
4033
name: ${{ env.VERSION_INFORMATION }} [${{ env.GIT_HASH }}] #https://stackoverflow.com/questions/58886293/getting-current-branch-and-commit-hash-in-github-action

.github/workflows/publish.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ jobs:
66
publish:
77
runs-on: ubuntu-latest
88
steps:
9-
- name: checkout repository
9+
- name: Checkout repository
1010
uses: actions/[email protected]
11-
- name: validate gradle wrapper
11+
- name: Validate Gradle wrapper
1212
uses: gradle/wrapper-validation-action@v1
13-
- name: setup jdk 17
13+
- name: Setup JDK 17
1414
uses: actions/[email protected]
1515
with:
1616
distribution: 'temurin'
1717
java-version: 17
18-
- name: make gradle wrapper executable
18+
- name: Make Gradle wrapper executable
1919
run: chmod +x ./gradlew
20-
- name: build
20+
- name: Build
2121
run: ./gradlew build
22-
- name: Retrieve Version #https://stackoverflow.com/questions/71089787/how-to-get-version-name-from-android-gradle-file-in-github-actions
22+
- name: Retrieve version #https://stackoverflow.com/questions/71089787/how-to-get-version-name-from-android-gradle-file-in-github-actions
2323
run: |
2424
echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q printVersionName)" >> $GITHUB_ENV
2525
echo "VERSION_PLAIN=$(${{github.workspace}}/gradlew -q printVersion)" >> $GITHUB_ENV
2626
echo "GAME_VERSIONS=$(${{github.workspace}}/gradlew -q printGameVersions)" >> $GITHUB_ENV
27-
- name: Publish Minecraft Mods
27+
- name: Publish Minecraft mods
2828
uses: Kir-Antipov/[email protected]
2929
with:
3030
version-type: beta

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ tasks.register('printGameVersions') {
9292

9393
tasks.register('printVersionName') {
9494
doLast {
95-
println version.split("-")[0] + " " + project.game_versions.replace(",", "-")
95+
println version.split("-")[0] + " (" + project.game_versions.replace(" ", "-").replaceAll("[>=<]", "") + ")"
9696
}
9797
}
9898

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ archives_base_name=linkart
1414
fabric_version=0.90.0+1.20.2
1515

1616
# Publishing
17-
game_versions=[1.19.2,1.20.2]
17+
game_versions=>=1.19.2 <=1.20.2

0 commit comments

Comments
 (0)