Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/react-native
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: electrode-io/react-native
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master-ern
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 5 commits
  • 2 files changed
  • 1 contributor

Commits on May 24, 2021

  1. Copy the full SHA
    0b45d3a View commit details

Commits on Jun 3, 2021

  1. Copy the full SHA
    195861e View commit details
  2. Copy the full SHA
    e2f5d84 View commit details
  3. Copy the full SHA
    036fd88 View commit details
  4. Copy the full SHA
    41ead3f View commit details
Showing with 58 additions and 0 deletions.
  1. +27 −0 .github/workflows/release-aar.yaml
  2. +31 −0 ReactAndroid/release.gradle
27 changes: 27 additions & 0 deletions .github/workflows/release-aar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release React Native AAR
# This workflow is manually triggered to release a new React Native AAR version
on:
workflow_dispatch:

jobs:
release-aar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
yarn install
echo "signing.gnupg.keyName=5A0C5406E56C2DC4749A8E481AF5F9E36EC70A60" >> gradle.properties
echo "signing.gnupg.passphrase=${OSSRH_GPG_SECRET_KEY_PASSWORD}" >> gradle.properties
echo "repositoryUsername=${OSSRH_SONATYPE_USERNAME}" >> gradle.properties
echo "repositoryPassword=${OSSRH_SONATYPE_PASSWORD}" >> gradle.properties
sed -i.bu 's/com.facebook.react/com.walmartlabs.ern/g' ReactAndroid/gradle.properties
./gradlew ReactAndroid:assembleRelease
./gradlew ReactAndroid:uploadArchives
env:
OSSRH_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
OSSRH_SONATYPE_USERNAME: ${{ secrets.OSSRH_SONATYPE_USERNAME }}
OSSRH_SONATYPE_PASSWORD: ${{ secrets.OSSRH_SONATYPE_PASSWORD }}
31 changes: 31 additions & 0 deletions ReactAndroid/release.gradle
Original file line number Diff line number Diff line change
@@ -20,6 +20,18 @@ def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}

def getRepositoryUrl() {
return project.findProperty("repositoryUrl") ?: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}

def getRepositoryUsername() {
return project.findProperty("repositoryUsername") ?: ""
}

def getRepositoryPassword() {
return project.findProperty("repositoryPassword") ?: ""
}

def configureReactNativePom(def pom) {
pom.project {
name(POM_NAME)
@@ -72,9 +84,28 @@ afterEvaluate { project ->

signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
useGpgCmd()
sign(configurations.archives)
}

uploadArchives {
configuration = configurations.archives
repositories.mavenDeployer {
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}

repository(url: getRepositoryUrl()) {
authentication(
userName: getRepositoryUsername(),
password: getRepositoryPassword())

}

configureReactNativePom(pom)
}
}

task installArchives(type: Upload) {
configuration = configurations.archives
repositories.mavenDeployer {