-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
82 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Create and publish a release to Github Packages | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] # Will trigger on (pre)release creation | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '21' | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle | ||
- name: Build and publish | ||
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RELEASE_VERSION: ${{ github.event.release.tag_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,41 @@ | ||
import com.vanniktech.maven.publish.MavenPublishPlugin | ||
|
||
plugins { | ||
alias(libs.plugins.multiplatform).apply(false) | ||
alias(libs.plugins.android.library).apply(false) | ||
alias(libs.plugins.kotlinx.serialization).apply(false) | ||
alias(libs.plugins.sqlDelight).apply(false) | ||
alias(libs.plugins.axion.release) | ||
alias(libs.plugins.maven.publish) | ||
} | ||
|
||
scmVersion { | ||
nextVersion { suffix.set("alpha") } | ||
versionCreator("versionWithCommitHash") | ||
allprojects { | ||
group = findProperty("GROUP").toString() | ||
version = System.getenv("RELEASE_VERSION")?.takeIf { it.isNotBlank() } | ||
?: findProperty("VERSION_NAME").toString() | ||
} | ||
|
||
version = scmVersion.version | ||
|
||
subprojects { | ||
project.version = rootProject.version | ||
plugins.withType<MavenPublishPlugin>().configureEach { | ||
extensions.findByType<PublishingExtension>()?.also { publishing -> | ||
logger.lifecycle("Publishing ${project.group}:${project.name}:${project.version}") | ||
publishing.repositories { | ||
// GitHub Packages | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/MercuryTechnologies/sqkon") | ||
credentials { | ||
username = System.getenv("GITHUB_ACTOR") | ||
password = System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.register("version") { | ||
notCompatibleWithConfigurationCache("Version task is not compatible with configuration cache") | ||
doLast { | ||
println("Version: $version") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,21 @@ org.gradle.configuration-cache=true | |
org.gradle.daemon=true | ||
org.gradle.parallel=true | ||
|
||
# Maven | ||
GROUP=com.mercury.sqkon | ||
VERSION_NAME=1.0.0-alpha01 | ||
POM_NAME=Sqkon | ||
POM_INCEPTION_YEAR=2024 | ||
POM_URL=https://github.com/MercuryTechnologies/sqkon/ | ||
POM_LICENSE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENSE_DIST=repo | ||
POM_SCM_URL=https://github.com/MercuryTechnologies/sqkon/ | ||
POM_SCM_CONNECTION=scm:git:git://github.com/MercuryTechnologies/sqkon.git | ||
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/MercuryTechnologies/sqkon.git | ||
POM_DEVELOPER_NAME=MercuryTechnologies | ||
POM_DEVELOPER_URL=https://github.com/MercuryTechnologies/ | ||
|
||
#Kotlin | ||
kotlin.code.style=official | ||
kotlin.daemon.jvmargs=-Xmx4G | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
POM_ARTIFACT_ID=library | ||
POM_NAME=Library | ||
POM_DESCRIPTION=Core library for Sqkon, includes runtime and code used to make sqkon work. |