Skip to content

Commit

Permalink
Publish to styx repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Vodes committed Dec 15, 2024
1 parent 50271ab commit a969fbf
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 16 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Publish macos build to styx repo"
on:
workflow_dispatch:
inputs:
version:
required: true
type: string

jobs:
build:
runs-on: macos-latest
env:
STYX_REPO_TOKEN: ${{ secrets.STYX_REPO_TOKEN }}
STYX_REPO_SECRET: ${{ secrets.STYX_REPO_SECRET }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Setup JDK"
id: setup-java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: gradle
- name: "Build and publish library"
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
run: |
chmod u+x ./gradlew
./gradlew publishAllPublicationsToStyxRepository -Pversion=${{ inputs.version }} -Dorg.gradle.parallel=false --stacktrace --no-configuration-cache
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import extensions.isMultiplatformModule
import extensions.kotlinMultiplatform

pluginManager.apply("com.vanniktech.maven.publish")
pluginManager.apply("maven-publish")

if (isMultiplatformModule()) {
kotlinMultiplatform {
Expand All @@ -13,16 +14,13 @@ if (isMultiplatformModule()) {
}
}

group = "cafe.adriel.voyager"
group = "moe.styx.forks.voyager"

configure<MavenPublishBaseExtension> {
publishToMavenCentral(host = SonatypeHost.S01, automaticRelease = true)
signAllPublications()

configure<MavenPublishBaseExtension> {
pom {
description = "A pragmatic navigation library for Jetpack Compose"
inceptionYear = "2021"
url = "https://github.com/adrielcafe/voyager"

licenses {
license {
Expand All @@ -31,18 +29,23 @@ configure<MavenPublishBaseExtension> {
distribution = "repo"
}
}
}
}

scm {
url = "https://github.com/adrielcafe/voyager"
connection = "scm:git:ssh://git@github.com/adrielcafe/voyager.git"
developerConnection = "scm:git:ssh://git@github.com/adrielcafe/voyager.git"
}

developers {
developer {
id = "adrielcafe"
name = "Adriel Cafe"
url = "https://github.com/adrielcafe/"
configure<PublishingExtension> {
repositories {
maven {
name = "Styx"
url = if (version.toString().contains("-SNAPSHOT", true))
uri("https://repo.styx.moe/snapshots")
else
uri("https://repo.styx.moe/releases")
credentials {
username = System.getenv("STYX_REPO_TOKEN")
password = System.getenv("STYX_REPO_SECRET")
}
authentication {
create<BasicAuthentication>("basic")
}
}
}
Expand Down

0 comments on commit a969fbf

Please sign in to comment.