Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maven publisher for kfactories. #8

Merged
merged 1 commit into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 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,26 @@ jobs:
java-version: 11

- run: ./gradlew test

publish:
name: Publish
if: ${{ github.ref == 'refs/heads/main' && github.repository == 'cashapp/kfactories' }}
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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching how it's done in other @cashapp repositories.

cat gradle.properties

- name: Publish the artifacts
run: |
gradle clean publish --stacktrace
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
GROUP=app.cash.kfactories

# HEY! If you change the major version here be sure to update release.yaml doc target folder!
VERSION_NAME=1.0.0-SNAPSHOT

POM_ARTIFACT_ID=kfactories
POM_NAME=kfactories
POM_DESCRIPTION=Set of factories and utils to create effective and lightweight property-based testing strategies.
Expand All @@ -21,3 +18,5 @@ POM_DEVELOPER_NAME=CashApp
POM_DEVELOPER_URL=https://github.com/cashapp/

systemProp.org.gradle.internal.http.socketTimeout=120000

VERSION_NAME=1.0.0-SNAPSHOT
Loading