Skip to content

Commit

Permalink
Merge branch 'main' into daniel/ruby-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard authored Jul 22, 2024
2 parents 8cafcea + 7ceab62 commit 17576ad
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 36 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Release Java SDK
run-name: Release Java SDK

on:
workflow_dispatch:

push:
tags:
- "*.*.*" # version, e.g. 1.0.0
Expand Down Expand Up @@ -97,9 +95,12 @@ jobs:
ls -R languages/java/src/main/resources
- name: Publish Maven
uses: gradle/gradle-build-action@b5126f31dbc19dd434c3269bf8c28c315e121da2 # v2.8.1
with:
arguments: publish
build-root-directory: languages/java
working-directory: languages/java
run: |
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }} # Last 8 characters of the full key ID
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,8 @@ languages/node/npm/**/*.node
languages/node/artifacts
languages/node/package/**/*


languages/ruby/infisical-sdk/Gemfile.lock
languages/ruby/infisical-sdk/pkg
languages/ruby/infisical-sdk/pkg

languages/java/gradle.properties
77 changes: 49 additions & 28 deletions languages/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
* This file was generated by the Gradle 'init' task.
*/

import com.vanniktech.maven.publish.SonatypeHost



plugins {
id 'java-library'
id 'maven-publish'
id "com.vanniktech.maven.publish" version "0.29.0"
id 'signing'
}

group 'com.infisical'

group = rootProject.group

repositories {
mavenCentral()
maven {
Expand All @@ -22,35 +29,49 @@ repositories {
api 'net.java.dev.jna:jna-platform:5.12.1'
}

description = 'InfisicalSDK'
java.sourceCompatibility = JavaVersion.VERSION_1_8

publishing {
publications {
maven(MavenPublication) {
groupId = 'com.infisical'
artifactId = 'sdk'

// Get the latest tag that we'll use for the release
def gitTag = 'git describe --tags --abbrev=0'.execute().text.trim()
version = "${gitTag}-SNAPSHOT"

afterEvaluate {
from components.java
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/infisical/sdk"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
description = 'InfisicalSDK'
java.sourceCompatibility = JavaVersion.VERSION_1_8
}



mavenPublishing {

// Get the latest tag that we'll use for the release
def gitTag = 'git describe --tags --abbrev=0'.execute().text.trim()
version = gitTag

coordinates("com.infisical", "sdk", version)


pom {
name = "Infisical SDK"
description = "Official Java SDK for Infisical"
inceptionYear = "2023"
url = "https://github.com/infisical/sdk"
licenses {
license {
name = "MIT License"
url = "https://opensource.org/license/MIT"
distribution = "repo"
}
}
developers {
developer {
id = "danielhougaard"
name = "Daniel Hougaard"
url = "https://github.com/danielhougaard/"
}
}
scm {
url = "https://github.com/infisical/sdk/"
connection = "scm:git:git://github.com/infisical/sdk.git"
developerConnection = "scm:git:ssh://[email protected]/infiscial/sdk.git"
}
}

publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
}

tasks.withType(JavaCompile) {
Expand Down

0 comments on commit 17576ad

Please sign in to comment.