Skip to content

Commit

Permalink
Doing work
Browse files Browse the repository at this point in the history
  • Loading branch information
gregwhitaker committed May 5, 2021
1 parent b8a78e2 commit f01b170
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
File renamed without changes.
25 changes: 25 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish

on:
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish to Github Artifact Repository
env:
GPR_USER: ${{ secrets.GPR_USER }}
GPR_API_KEY: ${{ secrets.GPR_API_KEY }}
run: ./gradlew build publish
21 changes: 21 additions & 0 deletions sqs-priority-client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id "java-library"
id "maven-publish"
id "com.avast.gradle.docker-compose" version "0.14.2"
id "com.nike.pdm.localstack" version "0.1.0"
id "com.github.johnrengelman.shadow" version "6.1.0"
Expand Down Expand Up @@ -45,6 +46,26 @@ test {
useJUnitPlatform()
}

// Publishing
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/gregwhitaker/sqs-priority-client")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
password = project.findProperty("gpr.key") ?: System.getenv("GPR_API_KEY")
}
}
}

publications {
gpr(MavenPublication) {
from(components.java)
}
}
}

// LocalStack
localstack {
workingDir = file("${projectDir}/localstack")
Expand Down

0 comments on commit f01b170

Please sign in to comment.