Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| developer:github_setup_for_plugins [2018/03/30 16:41] – created jay | developer:github_setup_for_plugins [2025/10/23 22:46] (current) – [Step 2: Create a new repo] davel17 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== How to set up your plugin using Git and GitHub ====== | ||
| + | |||
| + | So, you have a plugin that you've worked hard on and want to share with the Indigo community. The [[http:// | ||
| + | |||
| + | This article is a simple how-to on getting started with GitHub. While the flow presented here isn't the only way to get started (there are a wide variety of options for using Git and GitHub), it is one approach that we know works. | ||
| + | ===== Step 1: GitHub Account and App ===== | ||
| + | |||
| + | The first step is to create your GitHub account on the GitHub website. | ||
| + | |||
| + | Once you've done this, download the [[https:// | ||
| + | |||
| + | Open the GitHub Desktop app and log in using your newly created GitHub credentials. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ===== Step 2: Create a new repo ===== | ||
| + | |||
| + | Once you've logged in with GitHub Desktop, this is what you'll see: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | There are no repositories in the desktop app yet. Create a new one by clicking on the **'' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | There are a few options: | ||
| + | * Select a name for your repository. It can't contain spaces since it's used as part of a URL. | ||
| + | * Include a brief description (this is what will end up showing when users mouse-over your plugin in the Plugin Store list). | ||
| + | * Set the path to where you want the repository to be creates. A repository, in its physical manifestation, | ||
| + | * Make sure you check the **'' | ||
| + | * Select **'' | ||
| + | * Select a //License// that you want to release your source code under. **MIT** is a popular one because it's easy to read and understand and places very few limitations on source code use (also, **The Unlicense** is the least restrictive). Either of these two licenses have liability disclaimers which is probably the most important part. You don't have to add a license of course, but having a liability waiver is probably a good idea. | ||
| + | |||
| + | Click the **'' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | What that repo shows are outstanding changes you've made to the files in the repository since the last time you committed any. Committing a change (often referred to as checking in) just tells Git that it should remember the changes you've made (and, in the case of GitHub, what changes it needs to push up to your GitHub account so others can see them). | ||
| + | |||
| + | You haven' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | There you see the License file that contains the license you selected (it may be missing if you didn't specify a license). The other file you see is the README.md that you instructed Git to create for you (there are also some hidden files in there as well but you don't really need to know about those). | ||
| + | |||
| + | You are now ready to add your plugin (and any other files) to your repo. | ||
| + | |||
| + | ===== Step 3: Adding your Plugin to the Repo ===== | ||
| + | |||
| + | The next thing you want to do is add your plugin to the repo. Just drag your plugin to the repo folder: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Now, if you switch back to GitHub Desktop, you'll now see that there are some new changes showing up: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Notice that '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | This tells Git to ignore all files named '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Now, instead of the '' | ||
| + | |||
| + | ===== Step 4: Add Detail to README ===== | ||
| + | |||
| + | Before we commit the changes to the repo, let's go ahead and update the README.md file with a description of our plugin. README files on GitHub can come in two different formats: the most common is [[https:// | ||
| + | |||
| + | Your README will likely need to contain more information. Our example plugin is so simple it doesn' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | We just added a brief description of our plugin and usage since it's so simple: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ===== Step 5: Commit and Publish ===== | ||
| + | |||
| + | To briefly recap, you've created your GitHub account, downloaded the GitHub Desktop app, created a new local repository with some defaults, you've added your plugin and edited the README.md file. At this point, you're ready to commit your changes to the repo and publish those changes up to GitHub. | ||
| + | |||
| + | To commit the changes, make sure that all the changes in the GitHub app window are checked (they should be by default) and add a commit summary (very brief change description) and a description (which has more detail about the changes you're committing: | ||
| + | {{: | ||
| + | |||
| + | When you click the Commit to master button, you're telling your local Git repository that you want the changes to be marked as permanent. Now, as long as your local repository exists, those changes will be present. But that process doesn' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | This will show you the Publish Repository dialog: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | You can take this opportunity to adjust the repo description if you like (which can also be edited on the GitHub website). Make sure that you uncheck the **'' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ===== Step 6: Create a release ===== | ||
| + | |||
| + | To manage releases, you need to use the [[http:// | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Click on your repo and you'll go to the repo page: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | To create a release, click the **'' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Click the **'' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | For the **'' | ||
| + | |||
| + | There is only a single target (called **master**) at present so you can just leave that dropdown alone. | ||
| + | |||
| + | Next, give your release a brief title. We'll show this title in the table of releases for your Plugin in the Store. Write a longer description which we'll also show when the user discloses the release details in the plugin' | ||
| + | |||
| + | The next sub-step is optional, but it makes for a better experience for users we think. Create a zip archive on your Mac of just the plugin: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Then upload that archive to your release by dragging/ | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Doing this in a release will result in just the plugin itself to get downloaded to the user's Mac when they click the Download link on the Plugin Store page. If you don't do this, then what gets downloaded is a ZIP archive of the entire repository as it stands when you create the release. So, from the user's perspective, | ||
| + | |||
| + | Only published releases (not pre-releases) will be added to the Plugin Store' | ||
| + | |||
| + | Click the Publish Release button at the bottom left and you'll see your release as others would if they looked on GitHub: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Done! You can now go to your Indigo Account and Add the Plugin. We'll collect the information from your Repository and create the Plugin Store entry. You can edit parts of it at a later time, and if you create a new release on GitHub just edit and save it from your Indigo Account and we'll add the release. Be sure to look through the [[https:// | ||