How to .rb file in sketchup warehouse

I am a new developer; I don’t know how to add an extension file in the warehouse. I have developed an extension (viewport lock.rb), and now this file runs successfully on my PC. Now I want this file to show in the SketchUp Warehouse extension for other SketchUp users. plz help me.

Writing a piece of code that works is one thing (a good start :slight_smile: ). An extension has formalities and other requirements. Your viewport lock.rb is for sure not fulfill to these requirements. To publish it in EW you have to apply to become an official developer…
You can start to read these first:

Home | Get Started With Extension Development

Learn | developer.sketchup

File: Extension Requirements — SketchUp Ruby API Documentation

Creating a SketchUp Extension | developer.sketchup

Developer Application | SketchUp Extension Warehouse

By the way, if you want, you can publish your plugin on this forum (in the appropriate category: Extensions), clearly describing how to install and use it, on witch platform you are tested and other usefull informations…

As I said above, a .rb file is not an Extension, but historically it can be called as Plugin. These, usaully can be installed by copying it to the Plugin folder by anyone who wants to use it, so it will be loaded the next time Sketchup is started, if Unrestricted policy chosen in Extension Manager.
However, these Plugins also have requirements, the most important of which is that the methods must be wrapped in your own Namespace (-uniquely named) module, and they usually must have menu item(s) and/or Toolbar icon(s) to launch them, honor the undo stack, if relevant… do not use Global Variables…etc.
If you are not familiar with the above-mentioned terms (wordings) I used, it is better to clarify them for yourself first, before confusing even less educated users with your Plugin and risking your Plugin conflicting with other Extensions.