enable dev branch publishing
All checks were successful
github-mirror / push-github (push) Successful in 4s
Build / Gradle-Build (push) Successful in 17s
Publish / Gradle-Publish (push) Successful in 6s
Test / Gradle-Test (push) Successful in 13s

This commit is contained in:
tueem 2024-11-20 11:52:41 +01:00
parent 4ed5482b63
commit c241f6b1fe
Signed by: tueem
GPG Key ID: 65C8667EC17A88FB
2 changed files with 14 additions and 4 deletions

@ -1,11 +1,11 @@
name: Test name: Publish
on: on:
push: push:
branches: [master] branches: [master, dev]
jobs: jobs:
Gradle-Test: Gradle-Publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -34,7 +34,14 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- name: Publish - name: Publish Release
if: ${{ github.ref == '/refs/heads/master' }}
env:
GITEA_TOKEN: ${{ secrets.PUBLISH_PACKAGE_TOKEN }}
run: chmod +x gradlew; ./gradlew publishAllPublicationsToGiteaRepository -Prelease
- name: Publish Dev
if: ${{ github.ref == '/refs/heads/dev' }}
env: env:
GITEA_TOKEN: ${{ secrets.PUBLISH_PACKAGE_TOKEN }} GITEA_TOKEN: ${{ secrets.PUBLISH_PACKAGE_TOKEN }}
run: chmod +x gradlew; ./gradlew publishAllPublicationsToGiteaRepository run: chmod +x gradlew; ./gradlew publishAllPublicationsToGiteaRepository

@ -8,6 +8,7 @@ allprojects {
group = "net.tomatentum.Marinara" group = "net.tomatentum.Marinara"
version = "1.0.0-RC1" + (if (!project.hasProperty("release")) ("-" + getGitHash()) else "") version = "1.0.0-RC1" + (if (!project.hasProperty("release")) ("-" + getGitHash()) else "")
description = "A simple but powerful, library-agnostic Discord Interaction Wrapper." description = "A simple but powerful, library-agnostic Discord Interaction Wrapper."
} }
subprojects { subprojects {
@ -18,6 +19,8 @@ subprojects {
publishing { publishing {
publications { publications {
create<MavenPublication>("maven") { create<MavenPublication>("maven") {
if (!project.hasProperty("release"))
artifactId = project.getName() + "-dev"
from(components["java"]) from(components["java"])
} }
} }