Skip to content

Commit edc1d88

Browse files
authored
Merge pull request #33 from avianlabs/signed_maven_artifacts
publish signed artifacts
2 parents c887061 + 5286f56 commit edc1d88

13 files changed

+131
-45
lines changed

.github/workflows/main_branch.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,20 @@ jobs:
4545

4646
- name: Run tests
4747
run: ./gradlew check
48+
49+
- name: Import GPG key
50+
uses: crazy-max/ghaction-import-gpg@v6
51+
with:
52+
gpg_private_key: ${{ secrets.GPG_KEY }}
53+
passphrase: ${{ secrets.GPG_KEY_PASSWORD }}
4854

49-
- name: Build packages
50-
run: ./gradlew publishToMavenLocal
55+
- name: Publish to maven central
56+
env:
57+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER }}
58+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
59+
ORG_GRADLE_PROJECT_signingGnupgKeyName: ${{ secrets.GPG_KEY_ID }}
60+
ORG_GRADLE_PROJECT_signingGnupgPassphrase: ${{ secrets.GPG_KEY_PASSWORD }}
61+
run: ./gradlew publishAllPublicationsToMavenCentralRepository
5162

5263
- name: Bundle the failed build report
5364
if: failure()

.github/workflows/pull_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
run: ./gradlew check
4949

5050
- name: Build packages
51-
run: ./gradlew publishToMavenLocal
51+
run: ./gradlew -PsignPublications=false publishToMavenLocal
5252

5353
- name: Bundle the failed build report
5454
if: failure()

.github/workflows/release.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: 'Release'
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
permissions:
9+
pull-requests: write
10+
deployments: write
11+
checks: write
12+
statuses: write
13+
contents: write
14+
15+
jobs:
16+
build:
17+
name: Build Project
18+
runs-on: macos-14
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
submodules: 'true'
26+
27+
- uses: actions/setup-java@v4
28+
with:
29+
java-version: '18'
30+
distribution: 'temurin'
31+
32+
- name: Setup Gradle
33+
uses: gradle/actions/setup-gradle@v3
34+
35+
- name: Cache konan
36+
uses: actions/cache@v4
37+
with:
38+
path: ~/.konan
39+
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
40+
restore-keys: ${{ runner.os }}-konan-
41+
42+
- name: Import GPG key
43+
uses: crazy-max/ghaction-import-gpg@v6
44+
with:
45+
gpg_private_key: ${{ secrets.GPG_KEY }}
46+
passphrase: ${{ secrets.GPG_KEY_PASSWORD }}
47+
48+
- name: Publish to maven central
49+
env:
50+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER }}
51+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
52+
ORG_GRADLE_PROJECT_signingGnupgKeyName: ${{ secrets.GPG_KEY_ID }}
53+
ORG_GRADLE_PROJECT_signingGnupgPassphrase: ${{ secrets.GPG_KEY_PASSWORD }}
54+
run: ./gradlew -Psnapshot=false publishAndReleaseToMavenCentral --no-configuration-cache
55+
56+
- name: Bundle the failed build report
57+
if: failure()
58+
run: find ./build -type d -name 'reports' | zip -@ -r build-reports.zip
59+
60+
- name: Upload the failed build report
61+
if: failure()
62+
uses: actions/upload-artifact@v2
63+
with:
64+
name: error-report
65+
path: build-reports.zip
66+
retention-days: 7

.idea/.gitignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/artifacts/solana_kotlin_js_0_0_1.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/artifacts/solana_kotlin_js_0_1_3.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/artifacts/solana_kotlin_jvm_0_0_1.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/artifacts/solana_kotlin_jvm_0_1_3.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/artifacts/vendor_js_0_0_1.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/artifacts/vendor_jvm_0_0_1.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)