Skip to content

Commit

Permalink
Pubish with reusable-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Siro256 committed Dec 7, 2023
1 parent 569c832 commit c8e26e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
36 changes: 8 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,11 @@ jobs:
build:
name: Build
uses: Kotatsu-RTM/.github/.github/workflows/rtmpack_build.yml@master

publish:
name: Publish artifacts to the Maven repository
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout codes
uses: actions/checkout@v3

- name: Setup JDK8
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8
cache: gradle

# We're already validated gradle wrapper at build, so skip validation.
- name: Add permission to Gradle wrapper
run: chmod +x gradlew

- name: Publish
env:
NexusUsername: ${{ secrets.SIRO256_NEXUS_USER }}
NexusPassword: ${{ secrets.SIRO256_NEXUS_PASSWORD }}
SigningKeyId: ${{ secrets.SIRO256_MAVEN_SIGNING_KEY_ID }}
SigningKey: ${{ secrets.SIRO256_MAVEN_SIGNING_KEY }}
SigningKeyPassword: ${{ secrets.SIRO256_MAVEN_SIGNING_KEY_PASSWORD }}
run: ./gradlew publish
with:
Publishing: true
secrets:
RepositoryUsername: ${{ secrets.SIRO256_NEXUS_USER }}
RepositoryPassword: ${{ secrets.SIRO256_NEXUS_PASSWORD }}
SigningKeyId: ${{ secrets.SIRO256_MAVEN_SIGNING_KEY_ID }}
SigningKey: ${{ secrets.SIRO256_MAVEN_SIGNING_KEY }}
SigningKeyPassword: ${{ secrets.SIRO256_MAVEN_SIGNING_KEY_PASSWORD }}
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ allprojects {
}

credentials {
username = System.getenv("NexusUsername")
password = System.getenv("NexusPassword")
username = System.getenv("RepositoryUsername")
password = System.getenv("RepositoryPassword")
}
}
}
Expand Down

0 comments on commit c8e26e9

Please sign in to comment.