Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/workflow maven publish #51

Merged
merged 84 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
2850ce0
Merge pull request #28 from KeyValueSoftwareSystems/develop
varghese-babu Mar 28, 2024
5b4dd47
Fix Api configuration
varghese-babu Mar 28, 2024
727b7c4
Merge branch 'develop' of https://github.com/KeyValueSoftwareSystems/…
devi-krishna-kv Jun 10, 2024
2eab7ec
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
2af7033
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
036a3f9
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
3a4e5e8
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
bd1cf49
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
8c10af8
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
0f6a77e
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
8649abf
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
ce786f5
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
44a2fe3
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
23a7c5d
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
5d5e3f4
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
671d063
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
d1ae6b0
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
ab1fde2
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
0b1368c
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
b6429d5
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
27bc98a
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
74b391f
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
babc657
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
f65add1
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
874ed36
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
fef0f07
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
425b95d
add: workflow for publishing to maven central
devi-krishna-kv Jun 10, 2024
65af8c5
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
1567cbc
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
ff63cf0
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
0494d18
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
6e42826
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
1371858
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
b9d0be5
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
4134d56
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
a51a580
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
f17c1f8
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
66f0e0b
add: workflow for publishing to maven central
devi-krishna-kv Jun 11, 2024
813b90b
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
7b51fa5
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
ad0dffd
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
bbeeba2
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
79f71f5
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
b2822e0
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
cfaf0cb
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
0963150
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
566f50c
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
596ddde
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
c12e26c
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
370400f
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
9bc62fb
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
388a3c6
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
df392d7
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
d397081
add: workflow for publishing to maven central
devi-krishna-kv Jun 12, 2024
3cff002
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
5bd92dc
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
4abb685
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
cb51049
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
9091e90
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
7edeb56
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
9efca1a
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
464ea9e
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
9fd68fd
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
0fdadbd
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
844d07e
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
bb1ec18
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
5a6da7d
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
2d1046c
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
363583b
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
90c499c
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
4b98c9f
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
7adb9a9
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
622ed1f
add: workflow for publishing to maven central
devi-krishna-kv Jun 14, 2024
f865e99
add: workflow for publishing to maven central
devi-krishna-kv Jun 17, 2024
304a9dc
add: workflow for publishing to maven central
devi-krishna-kv Jun 17, 2024
4e566a8
add: workflow for publishing to maven central
devi-krishna-kv Jun 17, 2024
cfc418e
add: workflow for publishing to maven central
devi-krishna-kv Jun 17, 2024
1e18ec4
add: workflow for publishing to maven central
devi-krishna-kv Jun 17, 2024
67960bf
add: workflow for publishing to maven central
devi-krishna-kv Jun 18, 2024
ea3ad67
add:workflow for maven central publish
devi-krishna-kv Jun 19, 2024
6af6a64
add:workflow for maven central publish
devi-krishna-kv Jun 19, 2024
bd18bfd
add:workflow for maven central publish
devi-krishna-kv Jun 19, 2024
d485e1f
add:workflow for maven central publish
devi-krishna-kv Jun 19, 2024
770079e
add: workflow for publishing to maven central
devi-krishna-kv Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Publish to Maven Central

on:
workflow_dispatch:
# workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
# Step to check out the repository's code
- name: Checkout code
uses: actions/checkout@v3

# Step to set up JDK 17, which is required for Gradle to run
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Find the location of jdk
run: echo "${{ env.JAVA_HOME }}"

# - name: List the contents of the path java
# run: cd /opt/hostedtoolcache/jdk/17.0.11/x64 | ls

- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

# Step to grant execute permissions to the Gradle wrapper script
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Add new line
run: echo "" >> gradle.properties

- name: Add java home to gradle.properties
run: echo "org.gradle.java.home=${{ env.JAVA_HOME }}" >> gradle.properties

- name: Add signing key id to gradle.properties
run: echo "signing.keyId=${{ secrets.OSS_SIGNING_KEY_ID }}" >> gradle.properties

- name: Add signing password to gradle.proeprties
run: echo "signing.password=${{ secrets.OSS_SIGNING_PASSWORD }}" >> gradle.properties

- name: Add secret file loc to gradle.properties
run: echo "signing.secretKeyRingFile=/home/runner/work/siren-android-inbox/siren-android-inbox/siren-sdk/secring.gpg" >> gradle.properties

- name: Configure AWS credentials

uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE }}

- name: Download s3 secring file
run: aws s3 cp s3://${{ secrets.BUCKET }}/secring.gpg /home/runner/work/siren-android-inbox/siren-android-inbox/siren-sdk/secring.gpg

# - name: cat secring.gpg
# run: cat /home/runner/work/siren-android-inbox/siren-android-inbox/siren-sdk/secring.gpg

- name: Echo gradle.properties
run: cat gradle.properties
#Step to build the project and publish artifacts to Maven Central
- name: Build and publish
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSS_SIGNING_KEY_ID: ${{ secrets.OSS_SIGNING_KEY_ID }}
OSS_SIGNING_PASSWORD: ${{ secrets.OSS_SIGNING_PASSWORD }}
OSS_SIGNING_KEY: ${{ secrets.OSS_SIGNING_KEY }}
OSS_STAGING_PROFILE_ID: ${{ secrets.OSS_STAGING_PROFILE_ID }}
POM_DEVELOPER_ID: ${{ secrets.POM_DEVELOPER_ID }}
POM_DEVELOPER_NAME: ${{ secrets.POM_DEVELOPER_NAME }}
POM_DEVELOPER_EMAIL: ${{ secrets.POM_DEVELOPER_EMAIL }}
run: ./gradlew publishAllPublicationsToSonatypeRepository --stacktrace
22 changes: 12 additions & 10 deletions publish-package.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'maven-publish'
apply plugin: 'signing'


task androidJavadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
Expand Down Expand Up @@ -48,8 +49,8 @@ afterEvaluate {
artifactId 'sirenapp-android-inbox'
version '1.0.0'
pom {
name = artifactId
description = POM_DESCRIPTION
name = "$System.env.ARTIFACT_ID"
description = "$System.env.POM_DESCRIPTION"
url = 'https://github.com/KeyValueSoftwareSystems/siren-android-inbox'
licenses {
license {
Expand All @@ -63,9 +64,9 @@ afterEvaluate {
}
developers {
developer {
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
email = POM_DEVELOPER_EMAIL
id = "$System.env.POM_DEVELOPER_ID"
name = "$System.env.POM_DEVELOPER_NAME"
email = "$System.env.POM_DEVELOPER_EMAIL"
}
}
}
Expand All @@ -78,8 +79,8 @@ afterEvaluate {
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"

credentials {
username ossrhUsername
password ossrhPassword
username "$System.env.OSSRH_USERNAME"
password "$System.env.OSSRH_PASSWORD"
}
}

Expand All @@ -89,14 +90,15 @@ afterEvaluate {
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"

credentials {
username ossrhUsername
password ossrhPassword
username "$System.env.OSSRH_USERNAME"
password "$System.env.OSSRH_PASSWORD"
}
}
}
}
}


signing {
sign publishing.publications
}
}
Loading