-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move artifact publishing from JCenter to Maven Central (#385)
* added publishing for maven central * reverted version bumps and added pr number to changelog * rely on badges for the latest version published in distribution channels * test maven central publishing with version 1.13.1
- Loading branch information
Showing
9 changed files
with
135 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Changelog | ||
|
||
<!-- | ||
Prepend the changelog with this template on every release. | ||
# [Unreleased] | ||
- Changes (<PR #>) | ||
--> | ||
|
||
## [Unreleased] | ||
- Moved artifact publishing from JCenter to Maven Central (#385) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
How To Release | ||
============== | ||
|
||
Due to Maven Central's very particular requirements, the release process is a bit | ||
elaborate and requires a good deal of local configuration. This guide should walk | ||
you through it. It won't do anyone outside of KeepSafe any good, but the workflow | ||
is representative of just about any project deploying via Sonatype. | ||
|
||
We currently deploy to Maven Central (via Sonatype's OSS Nexus instance). | ||
|
||
### Prerequisites | ||
|
||
1. A *published* GPG code-signing key | ||
1. A Sonatype Nexus OSS account with permission to publish in com.getkeepsafe | ||
1. Permission to push directly to https://github.com/KeepSafe/TapTargetView | ||
|
||
### Setup | ||
|
||
1. Add your GPG key to your github profile - this is required | ||
for github to know that your commits and tags are "verified". | ||
1. Configure your code-signing key in ~/.gradle.properties: | ||
```gradle | ||
signing.keyId=<key ID of your GPG signing key> | ||
signing.password=<your key's passphrase> | ||
signing.secretKeyRingFile=/path/to/your/secring.gpg | ||
``` | ||
1. Configure your Sonatype credentials in ~/.gradle.properties: | ||
```gradle | ||
SONATYPE_NEXUS_USERNAME=<nexus username> | ||
SONATYPE_NEXUS_PASSWORD=<nexus password> | ||
``` | ||
1. Configure git with your codesigning key; make sure it's the same as the one | ||
you use to sign binaries (i.e. it's the same one you added to gradle.properties): | ||
```bash | ||
# Do this for the TapTargetView repo only | ||
git config user.email "[email protected]" | ||
git config user.signingKey "your-key-id" | ||
``` | ||
|
||
### Pushing a build | ||
|
||
1. Edit gradle.properties, update the VERSION property for the new version release | ||
1. Edit changelog, add relevant changes, note the date and new version (follow the existing pattern) | ||
1. Add new `## [Unreleased]` header for next release | ||
1. Verify that the everything works: | ||
```bash | ||
./gradlew clean check | ||
``` | ||
1. Make a *signed* commit: | ||
```bash | ||
git commit -S -m "Release version X.Y.Z" | ||
``` | ||
1. Make a *signed* tag: | ||
```bash | ||
git tag -s -a X.Y.Z | ||
``` | ||
1. Upload binaries to Sonatype: | ||
```bash | ||
./gradlew publish | ||
``` | ||
1. Go to [Sonatype](https://oss.sonatype.org/), log in with your credentials | ||
1. Click "Staging Repositories" | ||
1. Find the "comgetkeepsafe" repo, usually at the bottom of the list | ||
1. "Close" the repository (select it then click the "close" button up top), the text field doesn't matter so put whatever you want in it | ||
1. Wait until that's done | ||
1. "Release" the repository, leave the checkbox checked. Hooray, we're in Maven Central now! | ||
1. Push all of our work to Github to make it official. Check previous [releases](https://github.com/KeepSafe/TapTargetView/releases) and edit tag release changes: | ||
```bash | ||
git push --tags origin master | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
android.enableJetifier=true | ||
android.useAndroidX=true | ||
android.useAndroidX=true | ||
|
||
GROUP=com.getkeepsafe.taptargetview | ||
VERSION_NAME=1.13.1 | ||
POM_ARTIFACT_ID=taptargetview | ||
|
||
POM_NAME=TapTargetView | ||
POM_PACKAGING=aar | ||
|
||
POM_DESCRIPTION=An implementation of tap targets from the Material Design guidelines for feature discovery | ||
POM_INCEPTION_YEAR=2016 | ||
|
||
POM_URL=https://github.com/KeepSafe/TapTargetView | ||
POM_SCM_URL=https://github.com/KeepSafe/TapTargetView | ||
POM_SCM_CONNECTION=scm:git:git://github.com/KeepSafe/TapTargetView.git | ||
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]:KeepSafe/TapTargetView.git | ||
|
||
POM_LICENCE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENCE_DIST=repo | ||
|
||
POM_DEVELOPER_ID=keepsafe | ||
POM_DEVELOPER_NAME=KeepSafe Software, Inc. | ||
POM_DEVELOPER_URL=https://github.com/KeepSafe/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters