Skip to content
This repository was archived by the owner on Aug 8, 2022. It is now read-only.

Commit e3b956d

Browse files
authored
Merge branch 'master' into fix-diff
2 parents 7ba50ef + 88b151a commit e3b956d

9 files changed

Lines changed: 175 additions & 249 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish package to the Maven Central Repository
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
environment:
8+
name: Central Repository Deployment
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Java
13+
uses: actions/setup-java@v2
14+
with:
15+
java-version: '8'
16+
distribution: 'adopt'
17+
- name: Publish Testify Library
18+
run: ./gradlew Library:uploadArchives
19+
env:
20+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
21+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
22+
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}
23+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
24+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
25+
- name: Publish Testify Gradle plugin
26+
run: ./gradlew Plugin:uploadArchives
27+
env:
28+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
29+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
30+
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}
31+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
32+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}

Library/bintray.build.gradle

Lines changed: 0 additions & 111 deletions
This file was deleted.

Library/build.gradle

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
plugins {
22
id 'com.android.library'
33
id 'kotlin-android'
4-
id 'com.github.dcendents.android-maven'
5-
id 'com.jfrog.bintray'
4+
id 'maven'
5+
id 'signing'
66
id 'org.jetbrains.dokka'
77
}
88

9+
ext {
10+
pom = [
11+
publishedGroupId : 'com.shopify.testify',
12+
artifact : 'testify',
13+
libraryName : 'testify',
14+
libraryDescription: 'Android screenshot instrumentation tests.',
15+
siteUrl : 'https://github.com/Shopify/android-testify',
16+
gitUrl : 'https://github.com/Shopify/android-testify.git',
17+
licenseName : 'The MIT License',
18+
licenseUrl : 'https://opensource.org/licenses/MIT',
19+
author : 'Shopify Inc.'
20+
]
21+
}
22+
923
def VERSION_NAME = "$project.versions.testify"
1024

1125
version = VERSION_NAME
26+
archivesBaseName = pom.artifact
1227

1328
android {
1429
compileSdkVersion coreVersions.compileSdk
@@ -76,5 +91,13 @@ android {
7691
}
7792
}
7893

79-
apply from: "bintray.build.gradle"
94+
task sourcesJar(type: Jar) {
95+
from android.sourceSets.main.java.srcDirs
96+
classifier = 'sources'
97+
}
98+
99+
afterEvaluate { project ->
100+
apply from: "../publish.build.gradle"
101+
}
102+
80103
apply from: '../ktlint.gradle'

PUBLISHING.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
# Publishing
22

3-
Testify is published to Bintray and jcenter under the `shopify-android` organization. https://bintray.com/shopify/shopify-android
3+
Testify is published to the Maven Central Repository via GitHub Actions.
44

5-
- Update the `testify` version in [build.gradle](https://github.com/Shopify/android-testify/blob/master/build.gradle#L33)
6-
- Define the environment variable `BINTRAY_USER`. Set this to a valid user name from the Shopify Bintray organization.
7-
Thus value can be found at https://bintray.com/profile/edit
8-
- Define the environment variable `BINTRAY_KEY`. This can be found in a Bintray user profile's left menu, under "API Key".
9-
- Upload the library to Bintray using the following gradle command:
10-
`./gradlew Library:clean Library:assemble Library:bintrayUpload`
11-
- Upload the Gradle plugin to Bintray using the following gradle command:
12-
`./gradlew Plugin:clean Plugin:assemble Plugin:bintrayUpload`
5+
- Update the `testify` version in [build.gradle](https://github.com/Shopify/android-testify/blob/master/build.gradle#L33) and commit the version bump
6+
- Create a new release on Github. This will invoke the publish Github action and automatically build, sign, and upload to the OSSRH staging repository.
7+
- Promotion from OSSRH to Central Repository requires a manual review for validation before becoming publicly available

Plugins/Gradle/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ You can customize the destination path and file name for the report file by prov
7474
Example:
7575

7676
```bash
77-
./gradlew :reportPull -PreportPath="/user/testify/" -PreportFileName="my-report.yml"
77+
./gradlew Sample:reportPull -PreportPath="/user/testify/" -PreportFileName="my-report.yml"
7878
```
7979

8080
### reportShow
@@ -183,4 +183,4 @@ Verify that the ImageMagick tools required for diff images are installed. The `g
183183
Verify that the ImageMagick tools required for diff images are installed
184184
------------------------------------------------------------
185185
Compare = true
186-
```
186+
```

0 commit comments

Comments
 (0)