Skip to content

Commit

Permalink
Merge pull request #134 from uw-it-edm/jfshen
Browse files Browse the repository at this point in the history
CAB-6227 try to publish jar file to github packages
  • Loading branch information
jfshenuw authored Dec 14, 2023
2 parents 174be9f + 3262b1a commit af412eb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ jobs:
run: ./gradlew build
- name: Deploy artifacts
run: ./gradlew build artifactoryPublish
- name: Publish package to github packages
uses: gradle/gradle-build-action@v2
with:
arguments: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Slack Notification
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: gws-client Build Alert
SLACK_COLOR: '#ff0000'
SLACK_COLOR: '#ff0000'
17 changes: 15 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://repo.spring.io/releases is not available
// see https://stackoverflow.com/questions/76370197/spring-propdeps-plugin-no-longer-working
buildscript {
ext {
springBootVersion = '2.0.5.RELEASE'
Expand All @@ -6,7 +8,7 @@ buildscript {
repositories {
jcenter()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/plugins-release' }
maven { url "https://repo.spring.io/plugins-snapshot" }
maven { url "https://raw.githubusercontent.com/uw-it-edm/edm-artifacts/master" }
maven { url "https://plugins.gradle.org/m2/" }
}
Expand All @@ -16,7 +18,7 @@ buildscript {
classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.5.2"
classpath("org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1")
classpath("nu.studer:gradle-credentials-plugin:1.0.7")
classpath 'io.spring.gradle:propdeps-plugin:0.0.10.RELEASE'
classpath 'io.spring.gradle:propdeps-plugin:0.0.8-SNAPSHOT'
}
}

Expand Down Expand Up @@ -68,6 +70,17 @@ allprojects {
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/uw-it-edm/gws-client"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}

publications {
mavenJava(MavenPublication) {
from components.java
Expand Down

0 comments on commit af412eb

Please sign in to comment.