Skip to content

Commit 354e9bf

Browse files
committed
Fix workflows
1 parent e748a24 commit 354e9bf

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: build
3131
run: ./gradlew build
3232
- name: capture build artifacts
33-
if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS
33+
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from LTS java on one OS
3434
uses: actions/upload-artifact@v2
3535
with:
3636
name: Artifacts

.github/workflows/release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Taken from Leuokcyte (https://github.com/NucleoidMC/leukocyte/blob/main/.github/workflows/release.yml)
22

3-
name: Release
3+
name: Fabric Release
44

55
on:
66
release:
77
types:
88
- published
9+
workflow_dispatch:
910

1011
jobs:
1112
build:
@@ -33,11 +34,9 @@ jobs:
3334
- name: Build and publish with Gradle
3435
run: ./gradlew build modrinth curseforge --stacktrace
3536
env:
36-
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
37-
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
38-
# MAVEN_URL: ${{ secrets.MAVEN_URL }}
39-
# MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
40-
# MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
37+
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
38+
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
39+
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
4140

4241
- name: Upload GitHub release
4342
uses: AButler/upload-release-assets@v2.0

build.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ repositories {
1717
}
1818
}
1919

20-
sourceCompatibility = JavaVersion.VERSION_16
21-
targetCompatibility = JavaVersion.VERSION_16
22-
2320
archivesBaseName = project.archives_base_name
2421
version = project.mod_version
2522
group = project.maven_group
@@ -107,7 +104,7 @@ curseforge {
107104

108105
project {
109106
id = "462519"
110-
changelog = "A changelog can be found at https://github.com/samolego/GolfIV/releases/latest"
107+
changelog = ENV.CHANGELOG ?: "A changelog can be found at https://github.com/samolego/GolfIV/releases/tag/${version}"
111108
releaseType = "release"
112109
addGameVersion "${project.minecraft_version}"
113110
addGameVersion "Fabric"
@@ -136,7 +133,7 @@ task modrinth(type: TaskModrinthUpload, dependsOn: remapJar) {
136133
versionNumber = version
137134
versionName = "[${project.minecraft_version}] GolfIV ${version}"
138135
releaseType = "release"
139-
changelog = "A changelog can be found at https://github.com/samolego/GolfIV/releases/latest"
136+
changelog = ENV.CHANGELOG ?: "A changelog can be found at https://github.com/samolego/GolfIV/releases/tag/${version}"
140137

141138
uploadFile = file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")
142139

0 commit comments

Comments
 (0)