Skip to content

Commit

Permalink
Use github release tags in builds (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregHib authored Mar 11, 2024
1 parent 320a765 commit 73d4536
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@ jobs:
run: chmod +x gradlew
- name: Get build version
run: echo "build_version=$(./gradlew -q printVersion)" >> $GITHUB_ENV
- name: Check tag matches project version
if: ${{ env.build_version != github.ref_name }}
run: exit 1
- name: Run distribution assembly
run: ./gradlew buildScripts assembleBundleDist
- name: Upload distribution
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release create ${{ github.ref_name }} ./game/build/distributions/void-${{ github.ref_name }}.zip
gh release create ${{ github.ref_name }} ./game/build/distributions/void-${{ env.build_version }}.zip
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")

group = "world.gregs.void"
version = "1.1.6"
version = System.getenv("GITHUB_REF_NAME") ?: "dev"

java.sourceCompatibility = JavaVersion.VERSION_19
java.targetCompatibility = java.sourceCompatibility
Expand Down
4 changes: 2 additions & 2 deletions game/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,5 @@ distributions {
}
}

tasks["bundleDistTar"].dependsOn("startScripts")
tasks["bundleDistZip"].dependsOn("startScripts")
tasks["bundleDistTar"].dependsOn("buildScripts")
tasks["bundleDistZip"].dependsOn("buildScripts")

0 comments on commit 73d4536

Please sign in to comment.