Skip to content

Setup Release -> Publish Package workflow#18

Merged
ryantrem merged 11 commits into
BabylonJS:masterfrom
ryantrem:publish-package
Jun 2, 2020
Merged

Setup Release -> Publish Package workflow#18
ryantrem merged 11 commits into
BabylonJS:masterfrom
ryantrem:publish-package

Conversation

@ryantrem

Copy link
Copy Markdown
Member

The main goal of these changes is to introduce a GitHub Actions workflow that publishes the Babylon React Native NPM package when a GitHub Release is created (expects releases to be tagged with a valid version, e.g. v0.1.2-alpha.1, v0.1.2, etc.). For testing purposes, I had this publish the package to this GitHub repos package feed, but later we will switch it to npmjs.com. The changes required for this are:

  • Introduce publish.yml, a simple GitHub Actions workflow that is triggered by a Release being created. It basically just gets the version number from the release tag and publishes the NPM package. Note that my plan is to just leave the version in the package.json as 0.0.0 which is fine for local builds, and the version will only be set (but not committed back) when publishing a package following the creation of a Release.
  • In order to publish a package to GitHub, the package name must be scoped (e.g. start with @BabylonJS), so I renamed the package (in package.json) to @babylonjs/react-native.
  • Given the above, when consuming the package, the path in node_modules must match the package name, so I also moved the react-native-babylon folder to @babylonjs/react-native. NOTE: After syncing this change, you will need to git clean -dxff or the react native playground app won't launch.
  • Moved the usage section of the root README.md into the @babylonjs/react-native README.md since this is displayed on the package page (GitHub or npmjs.com).
  • Fixed the repository path in the package.json (it must be correct or GitHub won't allow the package to be published).

@ryantrem ryantrem merged commit af49798 into BabylonJS:master Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant