Skip to content

Commit

Permalink
[Draft] Re-enable Android artifact generation and NPM publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi committed Sep 24, 2023
1 parent b04fd56 commit 83a8498
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scripts/publish-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ const {echo, exit} = require('shelljs');
const {publishPackage, getNpmInfo} = require('./npm-utils');
const getAndUpdateNightlies = require('./monorepo/get-and-update-nightlies');
const setReactNativeVersion = require('./set-rn-version');
/* [macOS We do not generate Android artifacts for React Native macOS
const {
generateAndroidArtifacts,
publishAndroidArtifactsToMaven,
} = require('./release-utils');
macOS] */
const fs = require('fs');
const path = require('path');
const yargs = require('yargs');
Expand Down Expand Up @@ -96,7 +94,7 @@ function publishNpm(buildType) {
}
}

// generateAndroidArtifacts(version); // [macOS] We do not generate Android artifacts for React Native macOS
generateAndroidArtifacts(version);

// Write version number to the build folder
const versionFile = path.join('build', '.version');
Expand All @@ -109,10 +107,8 @@ function publishNpm(buildType) {

// We first publish on Maven Central all the necessary artifacts.
// NPM publishing is done just after.
// [macOS] We do not generate Android artifacts for React Native macOS
// publishAndroidArtifactsToMaven(version, buildType === 'nightly');
publishAndroidArtifactsToMaven(version, buildType === 'nightly');

/* [macOS] Skip the NPM Publish here as we do that in our Azure Pipeline
const packagePath = path.join(__dirname, '..', 'packages', 'react-native');
const result = publishPackage(packagePath, {
tag,
Expand All @@ -126,7 +122,6 @@ function publishNpm(buildType) {
echo(`Published to npm ${version}`);
return exit(0);
}
macOS] */
}

module.exports = publishNpm;
2 changes: 2 additions & 0 deletions scripts/release-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function generateAndroidArtifacts(releaseVersion) {
}

function publishAndroidArtifactsToMaven(releaseVersion, isNightly) {
/* [macOS] Skip publishing to Maven Central
// -------- Publish every artifact to Maven Central
// The GPG key is base64 encoded on CircleCI and then decoded here
let buff = Buffer.from(env.ORG_GRADLE_PROJECT_SIGNING_KEY_ENCODED, 'base64');
Expand Down Expand Up @@ -81,6 +82,7 @@ function publishAndroidArtifactsToMaven(releaseVersion, isNightly) {
}
echo('Published artifacts to Maven Central');
macOS] */
}

function generateiOSArtifacts(
Expand Down

0 comments on commit 83a8498

Please sign in to comment.