Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
samolego committed Dec 6, 2021
1 parent e748a24 commit 354e9bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from LTS java on one OS
uses: actions/upload-artifact@v2
with:
name: Artifacts
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Taken from Leuokcyte (https://github.com/NucleoidMC/leukocyte/blob/main/.github/workflows/release.yml)

name: Release
name: Fabric Release

on:
release:
types:
- published
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -33,11 +34,9 @@ jobs:
- name: Build and publish with Gradle
run: ./gradlew build modrinth curseforge --stacktrace
env:
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
# MAVEN_URL: ${{ secrets.MAVEN_URL }}
# MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
# MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CHANGELOG: ${{ steps.changelog.outputs.changelog }}

- name: Upload GitHub release
uses: AButler/[email protected]
Expand Down
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ repositories {
}
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
Expand Down Expand Up @@ -107,7 +104,7 @@ curseforge {

project {
id = "462519"
changelog = "A changelog can be found at https://github.com/samolego/GolfIV/releases/latest"
changelog = ENV.CHANGELOG ?: "A changelog can be found at https://github.com/samolego/GolfIV/releases/tag/${version}"
releaseType = "release"
addGameVersion "${project.minecraft_version}"
addGameVersion "Fabric"
Expand Down Expand Up @@ -136,7 +133,7 @@ task modrinth(type: TaskModrinthUpload, dependsOn: remapJar) {
versionNumber = version
versionName = "[${project.minecraft_version}] GolfIV ${version}"
releaseType = "release"
changelog = "A changelog can be found at https://github.com/samolego/GolfIV/releases/latest"
changelog = ENV.CHANGELOG ?: "A changelog can be found at https://github.com/samolego/GolfIV/releases/tag/${version}"

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

Expand Down

0 comments on commit 354e9bf

Please sign in to comment.