Skip to content

Commit

Permalink
- Added maven publish actions (#20)
Browse files Browse the repository at this point in the history
- Updated readme with installation
- Added releasing guide

Co-authored-by: i.ryabchuk <[email protected]>
  • Loading branch information
ilya-rb and i.ryabchuk committed May 23, 2023
1 parent 4c4a4ec commit 9729a70
Show file tree
Hide file tree
Showing 18 changed files with 183 additions and 122 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/animators_publish_bintray_action.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/animators_publish_maven_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "animators: publish (maven)"

on:
release:
types: [ published ]

jobs:
publish-maven:
runs-on: ubuntu-latest
if: contains(github.ref, 'animators') || contains(github.ref, 'all')

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt-hotspot'
#Decode key ring file from secrets and put it to ~/.gradle/
- name: Decode
run: 'echo "${{secrets.SIGNING_SECRET_KEY_RING_FILE}}" | base64 -d > secring.gpg'
- uses: eskatos/gradle-command-action@v1
with:
arguments: :animators:publish -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=../secring.gpg
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
22 changes: 0 additions & 22 deletions .github/workflows/decorations_publish_bintray_action.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/decorations_publish_maven_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "decorations: publish (maven)"

on:
release:
types: [ published ]

jobs:
publish-maven:
runs-on: ubuntu-latest
if: contains(github.ref, 'decorations') || contains(github.ref, 'all')

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt-hotspot'
#Decode key ring file from secrets and put it to ~/.gradle/
- name: Decode
run: 'echo "${{secrets.SIGNING_SECRET_KEY_RING_FILE}}" | base64 -d > secring.gpg'
- uses: eskatos/gradle-command-action@v1
with:
arguments: :decorations:publish -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=../secring.gpg
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
22 changes: 0 additions & 22 deletions .github/workflows/delegates_publish_bintray_action.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/delegates_publish_maven_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "delegates: publish (maven)"

on:
release:
types: [ published ]

jobs:
publish-maven:
runs-on: ubuntu-latest
if: contains(github.ref, 'delegates') || contains(github.ref, 'all')

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt-hotspot'
#Decode key ring file from secrets and put it to ~/.gradle/
- name: Decode
run: 'echo "${{secrets.SIGNING_SECRET_KEY_RING_FILE}}" | base64 -d > secring.gpg'
- uses: eskatos/gradle-command-action@v1
with:
arguments: :delegates:publish -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=../secring.gpg
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
26 changes: 26 additions & 0 deletions .github/workflows/kextensions_publish_maven_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "kextensions: publish (maven)"

on:
release:
types: [ published ]

jobs:
publish-maven:
runs-on: ubuntu-latest
if: contains(github.ref, 'kextensions') || contains(github.ref, 'all')

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt-hotspot'
#Decode key ring file from secrets and put it to ~/.gradle/
- name: Decode
run: 'echo "${{secrets.SIGNING_SECRET_KEY_RING_FILE}}" | base64 -d > secring.gpg'
- uses: eskatos/gradle-command-action@v1
with:
arguments: :kextensions:publish -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=../secring.gpg
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
22 changes: 0 additions & 22 deletions .github/workflows/kextenstions_publish_bintray_action.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/rxdiffadapter_publish_bintray_action.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/rxdiffadapter_publish_maven_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "rxdiffadapter: publish (maven)"

on:
release:
types: [ published ]

jobs:
publish-maven:
runs-on: ubuntu-latest
if: contains(github.ref, 'rxdiffadapter') || contains(github.ref, 'all')

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt-hotspot'
#Decode key ring file from secrets and put it to ~/.gradle/
- name: Decode
run: 'echo "${{secrets.SIGNING_SECRET_KEY_RING_FILE}}" | base64 -d > secring.gpg'
- uses: eskatos/gradle-command-action@v1
with:
arguments: :rxdiffadapter:publish -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=../secring.gpg
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
5 changes: 0 additions & 5 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
RecyclerKit
============
# RecyclerKit
![Version](https://img.shields.io/github/license/revolut-mobile/RecyclerKit) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)

## Installation

Gradle is the only supported build configuration. Since 1.1 RecyclerKit is hosted on mavenCentral,
in order to fetch the dependency, add the following lines to your project level `build.gradle.kts`:

```
allprojects {
repositories {
mavenCentral()
}
}
```

And then to the module level `build.gradle.kts`:

```
dependencies {
implementation 'com.revolut.recyclerkit:delegates:1.1.0'
implementation 'com.revolut.recyclerkit:rxdiffadapter:1.1.0'
implementation 'com.revolut.recyclerkit:decorations:1.1.0'
implementation 'com.revolut.recyclerkit:kextensions:1.1.0'
implementation 'com.revolut.recyclerkit:animators:1.1.0'
}
```

## Snapshots

For using snapshot dependencies use the separate repository:

```
allprojects {
repositories {
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
}
```

License
-------
Expand Down
10 changes: 10 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Releasing

Each project is released separately.<br>
The release tag name (version) prefix is **mandatory** and used to determine which project to release and upload to the Bintray.

1. Change the version in `gradle.properties` (from subproject directory) to a non-SNAPSHOT version.
2. Update the `README.md` with the new version.
3. Go to [releases](https://github.com/revolut-mobile/RecyclerKit/releases) and create new release. The `tag version` must have the prefix, e.g. dod-1.4-migrate-to-maven
4. This will trigger uploading to maven staging repository, in order to propagate this release you need to go to https://s01.oss.sonatype.org/ and close the staging
5. When staging is closed, Release the library via the Nexus interface
2 changes: 1 addition & 1 deletion animators/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POM_ARTIFACT_ID=animators
VERSION_NAME=1.0.11
VERSION_NAME=1.1.0
POM_NAME=animators
POM_PACKAGING=jar
GROUP=com.revolut.recyclerkit
2 changes: 1 addition & 1 deletion decorations/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POM_ARTIFACT_ID=decorations
VERSION_NAME=1.0.9
VERSION_NAME=1.1.0
POM_NAME=decorations
POM_PACKAGING=jar
GROUP=com.revolut.recyclerkit
2 changes: 1 addition & 1 deletion delegates/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POM_ARTIFACT_ID=delegates
VERSION_NAME=1.0.11
VERSION_NAME=1.1.0
POM_NAME=delegates
POM_PACKAGING=jar
GROUP=com.revolut.recyclerkit
2 changes: 1 addition & 1 deletion kextensions/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POM_ARTIFACT_ID=kextensions
VERSION_NAME=1.0.8
VERSION_NAME=1.1.0
POM_NAME=extensions
POM_PACKAGING=jar
GROUP=com.revolut.recyclerkit
2 changes: 1 addition & 1 deletion rxdiffadapter/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POM_ARTIFACT_ID=rxdiffadapter
VERSION_NAME=1.0.8
VERSION_NAME=1.1.0
POM_NAME=rxdiffadapter
POM_PACKAGING=jar
GROUP=com.revolut.recyclerkit

0 comments on commit 9729a70

Please sign in to comment.