Skip to content

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Su5eD committed Jul 7, 2024
1 parent 5ec9fcd commit 93a8590
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
runs-on: ubuntu-22.04
outputs:
changelog: ${{ steps.changelog.outputs.changelog }}
container:
image: mcr.microsoft.com/openjdk/jdk:21-ubuntu
options: --user root
steps:
- run: apt update && apt install git -y && git --version
- run: git config --global --add safe.directory /__w/fabric/fabric
Expand All @@ -32,15 +35,11 @@ jobs:
with:
context: changelog
workflow_id: release.yml
- uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '21'
- uses: gradle/wrapper-validation-action@v2
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-write-only: true
- name: Build with Gradle
run: ./gradlew clean build --stacktrace
publish:
Expand Down Expand Up @@ -78,7 +77,6 @@ jobs:
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: true
gradle-home-cache-cleanup: true
- name: Publish with Gradle
run: ./gradlew clean build ${{ matrix.task }} --stacktrace
env:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ allprojects {

publishMods {
file.set(tasks.jar.flatMap { it.archiveFile })
changelog.set(providers.environmentVariable("CHANGELOG").orElse("# $version"))
changelog.set(providers.environmentVariable("CHANGELOG").orElse("# ${project.version}"))
type.set(providers.environmentVariable("PUBLISH_RELEASE_TYPE").orElse("alpha").map(ReleaseType::of))
modLoaders.add("neoforge")
dryRun.set(!providers.environmentVariable("CI").isPresent)
displayName.set("[$versionMc] Forgified Fabric API $version")
displayName.set("[$versionMc] Forgified Fabric API ${project.version}")

github {
accessToken.set(providers.environmentVariable("GITHUB_TOKEN"))
Expand Down

0 comments on commit 93a8590

Please sign in to comment.