Skip to content

Commit

Permalink
feat: beta builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Duzos committed Aug 26, 2024
1 parent 18ad2cf commit 018b59c
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 3 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish_beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

name: Automated beta builds

on:
push:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Run datagen
run: ./gradlew runDatagen

- name: Build
run: ./gradlew build
#env:
# BETA: 1 # exclude assets if it's a beta dev build

- name: Publish artifacts
uses: DrTheodor/[email protected]
with:
url: ${{ secrets.DEV_BUILDS }}
file: 'build/libs/*'
username: tony stank
avatar: 'https://img.asmedia.epimg.net/resizer/v2/5R475RB4FZAOJIDICEZLRYLDZM.jpg?auth=e8fe4ea252b5bf7424148eb36e30055f04fc07cd4b2cb88e8f94bee7b8346ac0&width=1472&height=1104&smart=true'
commit: '> :sparkles: [%MESSAGE%](<%LINK%>) by [%AUTHOR%](<%AUTHOR_LINK%>)'
message: |
<:new1:1253371736510959636><:new2:1253371805734015006> New `${{ github.repository }}` dev build `#${{ github.run_number }}`:
%COMMITS%
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ plugins {
id 'maven-publish'
}

version = project.mod_version
group = project.maven_group
apply from: 'versioning.gradle'

version = getCurrentVersion()
group = project.maven_group
base {
archivesName = project.archives_base_name
}
Expand Down Expand Up @@ -65,7 +66,7 @@ java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
// withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ loader_version=0.15.6

# Mod Properties
mod_version=1.0.0
mod_version_qualifier = alpha
maven_group=mc.duzo.timeless
archives_base_name=timeless

Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions versioning.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ext.getCurrentVersion = {
var patch = System.getenv("GITHUB_RUN_NUMBER")

return project.mod_version + (patch != null ? ("." + System.getenv("GITHUB_RUN_NUMBER")) : "")\
+ "-" + project.minecraft_version + "-" + project.mod_version_qualifier
}

0 comments on commit 018b59c

Please sign in to comment.