Skip to content

Commit

Permalink
release v0.1-rc
Browse files Browse the repository at this point in the history
fix: ci
  • Loading branch information
rand0m-cloud committed Nov 20, 2024
1 parent 5a484a3 commit 8cad9ac
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build bam2json
name: Build bam2json and release library on Maven Central

on:
push:
Expand All @@ -17,15 +17,25 @@ jobs:
distribution: 'temurin'
java-version: '20'
cache: 'gradle'
- run: ./gradlew --no-daemon --console plain :app:shadowJar
- run: mv app/build/libs/app-1.0-SNAPSHOT-all.jar ./bam2json.jar

- run: ./gradlew --no-daemon --console plain :app:shadowJar && mv app/build/libs/app-*-all.jar ./bam2json.jar

- name: Create bam2json release
uses: softprops/action-gh-release@v2
with:
files: ./bam2json.jar

- name: Setup GPG keys for signing
run: |
echo -e "${{ secrets.GPG_PUBLIC_KEY }}" > publickey.asc
echo -e "${{ secrets.GPG_PRIVATE_KEY }}" > secretkey.asc
echo -e "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
gpg --list-keys
- name: Setup Maven Central credentials
run: |
mkdir ~/.jreleaser
echo "JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_USERNAME=${{ secrets.MAVENCENTRAL_USERNAME }}" > ~/.jreleaser/config.properties
echo "JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_PASSWORD=${{ secrets.MAVENCENTRAL_PASSWORD }}" >> ~/.jreleaser/config.properties
echo "JRELEASER_GPG_PASSPHRASE=*" >> ~/.jreleaser/config.properties
- name: Run :releaseLibrary
run: ./gradlew --no-daemon --console plain :releaseLibrary
13 changes: 8 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.jreleaser.model.Active
import org.jreleaser.model.Signing

group = "io.github.rand0m-cloud.bam-file-reader"
version = "0.1"
version = "0.1-rc"

val stagingDeploy = rootProject.layout.buildDirectory.dir("staging-deploy")

Expand Down Expand Up @@ -38,6 +38,8 @@ allprojects {
}

jreleaser {
strict = true

project {
description = "A Kotlin project for using .bam files from the Panda3D engine."
copyright = "2024"
Expand All @@ -46,9 +48,10 @@ jreleaser {
signing {
active = Active.ALWAYS
armored = true
mode = Signing.Mode.FILE
publicKey = "publickey.asc"
secretKey = "secretkey.asc"
mode = Signing.Mode.COMMAND
command {
keyName = "3F702352828D85E5A456DB86159B0816973D1C2E"
}
}

deploy {
Expand All @@ -70,7 +73,7 @@ val cleanStagingMaven by tasks.registering(Delete::class) {
}

tasks.register("setupStagingMaven") {
dependsOn(cleanStagingMaven)
dependsOn(cleanStagingMaven, ":library:compileKotlin")
finalizedBy(":library:publishMavenPublicationToMavenRepository")
}

Expand Down

0 comments on commit 8cad9ac

Please sign in to comment.