Skip to content

Commit

Permalink
Add maven publisher for kfactories.
Browse files Browse the repository at this point in the history
  • Loading branch information
xethorn committed Jul 9, 2023
1 parent d395b8e commit fbdde2b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
paths-ignore:
- '*.md'
push:
branches:
- main

jobs:
build:
Expand All @@ -19,3 +22,27 @@ jobs:
java-version: 11

- run: ./gradlew test

publish:
name: Publish
if: ${{ github.ref == 'refs/heads/main' && github.repository == 'cashapp/kfactories' }}
needs: [jvm]
runs-on: [ubuntu-latest]
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ARTIFACT_SIGNING_PRIVATE_KEY }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Assign a version
run: |
# set a version name like "2023.05.26.091805-c1fcb3a"
echo "VERSION_NAME=$(git log -n1 --pretty='format:%cd' --date=format:'%Y.%m.%d.%H%M%S')-$(git rev-parse --short=7 HEAD)" >> gradle.properties
cat gradle.properties
- name: Publish the artifacts
run: |
gradle clean publish --stacktrace

0 comments on commit fbdde2b

Please sign in to comment.