mirror of
https://github.com/RoBaertschi/EnvironmentTech.git
synced 2025-04-19 23:03:28 +00:00
releases
This commit is contained in:
parent
032e58c663
commit
4e1e6f84e6
6
.github/workflows/gradle.yml
vendored
6
.github/workflows/gradle.yml
vendored
@ -43,6 +43,12 @@ jobs:
|
|||||||
- name: Build with Gradle Wrapper
|
- name: Build with Gradle Wrapper
|
||||||
run: ./gradlew publish -ProbaertschiPassword=${{ secrets.REPOSILITE_SECRET }} -ProbaertschiUsername=${{ secrets.REPOSILITE_NAME }}
|
run: ./gradlew publish -ProbaertschiPassword=${{ secrets.REPOSILITE_SECRET }} -ProbaertschiUsername=${{ secrets.REPOSILITE_NAME }}
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Artifacts
|
||||||
|
path: build/libs
|
||||||
|
|
||||||
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
|
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
|
||||||
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
|
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
|
||||||
#
|
#
|
||||||
|
43
.github/workflows/release.yml
vendored
Normal file
43
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
java: [ 21 ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: setup JDK${{ matrix.java }}
|
||||||
|
uses: actions/setup-java@1
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.java }}
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
|
||||||
|
|
||||||
|
- name: Get Version
|
||||||
|
id: mod_version
|
||||||
|
run: echo "mod_version=""$(./gradlew printVersion | grep -E ^[0-9]+\.[0-9]+ -m 1)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Minecraft Version
|
||||||
|
id: minecraft_version
|
||||||
|
run: grep "minecraftVersion" gradle.properties -m 1 | sed "s/\s//g" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create Realease
|
||||||
|
id: create_release
|
||||||
|
uses: actions/release-action@1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag: ${{ steps.mod_version.outputs.mod_version }}
|
||||||
|
name: EnvironmentTech ${{ steps.mod_version.outputs.mod_version }} for ${{ steps.minecraft_version.outputs.minecraftVersion }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
generateReleaseNotes: true
|
||||||
|
artifacts: "build/libs"
|
@ -51,7 +51,11 @@ val noTag = !details.lastTag.contains(Regex("""\d+\.\d+"""))
|
|||||||
val end = if (noTag) snapshot else "${details.commitDistance}${snapshot}"
|
val end = if (noTag) snapshot else "${details.commitDistance}${snapshot}"
|
||||||
|
|
||||||
val modVersion: String = "${details.lastTag}${if (details.commitDistance > 0 || noTag) end else ""}"
|
val modVersion: String = "${details.lastTag}${if (details.commitDistance > 0 || noTag) end else ""}"
|
||||||
|
val release = details.commitDistance == 0 && !noTag
|
||||||
println(modVersion)
|
println(modVersion)
|
||||||
|
if (release) {
|
||||||
|
println("Building in Release Mode")
|
||||||
|
}
|
||||||
|
|
||||||
version = modVersion
|
version = modVersion
|
||||||
group = modGroupId
|
group = modGroupId
|
||||||
@ -308,7 +312,7 @@ publishing {
|
|||||||
val baseURL = "https://maven.robaertschi.xyz/"
|
val baseURL = "https://maven.robaertschi.xyz/"
|
||||||
|
|
||||||
name = "robaertschi"
|
name = "robaertschi"
|
||||||
url = uri("${baseURL}${if (version.toString().endsWith("SNAPSHOT")) "snapshots" else "releases"}")
|
url = uri("${baseURL}${if (!release) "snapshots" else "releases"}")
|
||||||
credentials(PasswordCredentials::class)
|
credentials(PasswordCredentials::class)
|
||||||
authentication {
|
authentication {
|
||||||
register<BasicAuthentication>("basic")
|
register<BasicAuthentication>("basic")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user