Skip to content

Commit

Permalink
Merge pull request #19 from recurly/maven-workflow
Browse files Browse the repository at this point in the history
Maven workflow fixes
  • Loading branch information
mroman-recurly authored Aug 26, 2022
2 parents 5c80e04 + 6c1d98f commit 5a39aa6
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 41 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: maven publishing

on:
workflow_dispatch:
release:
types: [released]

Expand All @@ -25,16 +24,18 @@ jobs:
- name: Test
run: ./gradlew test

- name: Upload release
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
- name: Publish & Upload release
run: |
./gradlew publish --no-daemon --no-parallel
./gradlew closeAndReleaseRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: Publish release
run: ./gradlew closeAndReleaseRepository --no-daemon --no-parallel
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
# - name: Publish release
# run: ./gradlew closeAndReleaseRepository
# env:
# ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
# ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
24 changes: 24 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true

jobs:
publish:
name: Release
runs-on: ubuntu-latest

steps:
- name: Create Release on GitHub
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
draft: false
prerelease: false
3 changes: 2 additions & 1 deletion AndroidSdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ dependencies {
// Retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
}
}
apply plugin: "com.vanniktech.maven.publish"
25 changes: 25 additions & 0 deletions AndroidSdk/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true

GROUP=com.recurly
POM_ARTIFACT_ID=android-sdk
VERSION_NAME=2.0.0

POM_PACKAGING=aar

POM_NAME=Recurly Android SDK
POM_DESCRIPTION=Android SDK for Recurly payment services
POM_INCEPTION_YEAR=2022
POM_URL=https://github.com/recurly/recurly-client-android

POM_LICENSE_NAME=The Apache Software License, Version 2.0
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENSE_DIST=repo

POM_SCM_URL=https://github.com/recurly/recurly-client-android
POM_SCM_CONNECTION=scm:https://github.com/recurly/recurly-client-android.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:recurly/recurly-client-android.git

POM_DEVELOPER_ID=support
POM_DEVELOPER_NAME=Recurly Support
POM_DEVELOPER_EMAIL[email protected]
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ buildscript {
// in the individual module build.gradle files
}
}
apply plugin: "com.vanniktech.maven.publish"

33 changes: 2 additions & 31 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,11 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# AndroidX package structure to make it clearer which packages are bundled with the # Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
org.gradle.warning.mode=all

#POM Project settings
# You will need update the semamtic versioning in "VERSION_NAME" after changes are complete.
SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true

GROUP=com.recurly
POM_ARTIFACT_ID=android-sdk
VERSION_NAME=2.0.0

POM_PACKAGING=aar

POM_NAME=Recurly Android SDK
POM_DESCRIPTION=Android SDK for Recurly payment services
POM_INCEPTION_YEAR=2022
POM_URL=https://github.com/recurly/recurly-client-android

POM_LICENSE_NAME=The Apache Software License, Version 2.0
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENSE_DIST=repo

POM_SCM_URL=https://github.com/recurly/recurly-client-android
POM_SCM_CONNECTION=scm:https://github.com/recurly/recurly-client-android.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:recurly/recurly-client-android.git

POM_DEVELOPER_ID=support
POM_DEVELOPER_NAME=Recurly Support
POM_DEVELOPER_EMAIL=[email protected]
org.gradle.warning.mode=all

0 comments on commit 5a39aa6

Please sign in to comment.