diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28b7522..d57b981 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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' \ No newline at end of file + SLACK_COLOR: '#ff0000' diff --git a/build.gradle b/build.gradle index e31cf51..9219a1c 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,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/" } } @@ -16,7 +16,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.4") - classpath 'io.spring.gradle:propdeps-plugin:0.0.9.RELEASE' + classpath 'io.spring.gradle:propdeps-plugin:0.0.8-SNAPSHOT' } } @@ -68,6 +68,17 @@ allprojects { } publishing { + repositories { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/uw-it-edm/pws-client" + credentials { + username = System.getenv("GITHUB_ACTOR") ?: System.getenv("USER") + password = System.getenv("GITHUB_TOKEN") ?: System.getenv("GITHUB_PAT") + } + } + } + publications { mavenJava(MavenPublication) { from components.java