react-native-community / react-native-circleci-orb

A CircleCI Orb to Simplify Testing your React Native App
MIT License
174 stars 81 forks source link

Update the Orb development kit #177

Closed cortinico closed 7 months ago

cortinico commented 11 months ago

Adapted from https://github.com/CircleCI-Public/Orb-Template

Skipped a few best practices:

Note: RC007 is skipped because there is no home_url present in @orb.yml (source)

fotos commented 7 months ago

@cortinico

What's pending in this PR:

  1. A way to trigger a release. Previously merging into master was triggering a new release, using semantic-release. This doesn't exist in the current default flow from the template. Need a bit more effort to get this done.
  2. Understand the publishing flow and what needs to go into the orb-publishing context. Do we need to delete the current environment variables from the project settings (CIRCLECI_API_TOKEN and GH_TOKEN)?

What can be improved in the PR:

  1. I fixed a few linting issues but also skipped a few more (missing descriptions, improving description and extracting scripts). I believe all that can be done in a subsequent PR.
  2. Testing more commands – right now there is a "test" for yarn_install only.
cortinico commented 7 months ago
  1. A way to trigger a release. Previously merging into master was triggering a new release, using semantic-release. This doesn't exist in the current default flow from the template. Need a bit more effort to get this done.

According to documentation releases are triggered whenever we publish a new tag/release no? https://circleci.com/docs/creating-orbs/

I don't think we need any token or so setup

fotos commented 7 months ago
  1. A way to trigger a release. Previously merging into master was triggering a new release, using semantic-release. This doesn't exist in the current default flow from the template. Need a bit more effort to get this done.

According to documentation releases are triggered whenever we publish a new tag/release no? https://circleci.com/docs/creating-orbs/

I don't think we need any token or so setup

I also believe the tokens, which currently exist in the CircleCI environment, can be removed.

What I'm taking about above is something different. If you look at the documentation closely it says:

To publish a new version of our orb, you need to tag your release. A tag can be created and pushed manually, however we recommend using GitHub.com’s Releases feature.

Basically the orb publishing guide suggests triggering a release "manually" through the GH UI. Currently the project supports semantic-release which also updates the changelog and creates the GH release. I think we should maintain that.

All in all the flow should be:

That way merging into main will automatically trigger a release which will update the tag, the changelog, the GH release, and finally trigger the publish workflow. I believe that's the way forward. I'll get this done later today.

cortinico commented 7 months ago

That way merging into main will automatically trigger a release which will update the tag, the changelog, the GH release, and finally trigger the publish workflow. I believe that's the way forward. I'll get this done later today.

Yup that sounds reasonable to me 👍

cortinico commented 7 months ago

Are we fine merging this after ec0edd4 ?

fotos commented 7 months ago

Are we fine merging this after ec0edd4 ?

Heh, I was just writing that. I think that should do it.

~I'll go ahead and delete the ENV variables defined in CircleCI.~ Done. ✅

I believe this is good to go. It's hard to test the whole release flow anyway so let's get this merged and see what happens. 🤞

react-native-circleci-orb-bot commented 6 months ago

:tada: This PR is included in version 7.4.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: