Skip to content

Commit f01b170

Browse files
committed
Doing work
1 parent b8a78e2 commit f01b170

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed
File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up JDK 11
15+
uses: actions/setup-java@v2
16+
with:
17+
java-version: '11'
18+
distribution: 'adopt'
19+
- name: Grant execute permission for gradlew
20+
run: chmod +x gradlew
21+
- name: Publish to Github Artifact Repository
22+
env:
23+
GPR_USER: ${{ secrets.GPR_USER }}
24+
GPR_API_KEY: ${{ secrets.GPR_API_KEY }}
25+
run: ./gradlew build publish

sqs-priority-client/build.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id "java-library"
3+
id "maven-publish"
34
id "com.avast.gradle.docker-compose" version "0.14.2"
45
id "com.nike.pdm.localstack" version "0.1.0"
56
id "com.github.johnrengelman.shadow" version "6.1.0"
@@ -45,6 +46,26 @@ test {
4546
useJUnitPlatform()
4647
}
4748

49+
// Publishing
50+
publishing {
51+
repositories {
52+
maven {
53+
name = "GitHubPackages"
54+
url = uri("https://maven.pkg.github.com/gregwhitaker/sqs-priority-client")
55+
credentials {
56+
username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
57+
password = project.findProperty("gpr.key") ?: System.getenv("GPR_API_KEY")
58+
}
59+
}
60+
}
61+
62+
publications {
63+
gpr(MavenPublication) {
64+
from(components.java)
65+
}
66+
}
67+
}
68+
4869
// LocalStack
4970
localstack {
5071
workingDir = file("${projectDir}/localstack")

0 commit comments

Comments
 (0)