Skip to content

Commit

Permalink
Merge pull request #730 from galasa-dev/iss1596-remove-nexus
Browse files Browse the repository at this point in the history
Iss1596 Push to GitHub Actions instead of Nexus registry
  • Loading branch information
jadecarino authored Nov 7, 2023
2 parents 48c0df1 + 2a4d12d commit f20db23
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ jobs:
runs-on: ubuntu-latest
needs: [ build-local, prettier ]

permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -248,14 +252,13 @@ jobs:
- name: Build with Gradle
run: ./gradlew --info libertyPackage
working-directory: package-jar

- name: Publish with Gradle
- name: Publish with Gradle to GitHub Packages
if: ${{ github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/next' }}
run: ./gradlew --info publish
working-directory: package-jar
env:
ORG_GRADLE_PROJECT_galasaNexusUsername: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_galasaNexusPassword: ${{ secrets.NEXUS_PASSWORD }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload JAR
uses: actions/upload-artifact@v3
Expand Down
9 changes: 6 additions & 3 deletions package-jar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ publishing {

repositories {
maven {
name = 'galasaNexus'
url = 'https://nexus.galasa.dev/repository/docs/'
credentials(PasswordCredentials)
name = 'githubPackages'
url = 'https://maven.pkg.github.com/galasa-dev/galasa.dev'
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
mavenLocal()
}
Expand Down

0 comments on commit f20db23

Please sign in to comment.