| 1 |
# Plugin Release Guideline |
| 2 |
|
| 3 |
When you're ready to release the plugin, please follow the instructions below: |
| 4 |
|
| 5 |
1. Bump version |
| 6 |
1. Run build |
| 7 |
1. Add changelog |
| 8 |
1. Commit |
| 9 |
1. Tag and push |
| 10 |
|
| 11 |
## 1. Bump the version |
| 12 |
|
| 13 |
The version number is being used in various files, the `/bin/bump-version.sh` file makes it easier to update across the files. |
| 14 |
|
| 15 |
**Usage:** |
| 16 |
|
| 17 |
```bash |
| 18 |
# ./bin/bump-version.sh <VERSION_NUMBER> |
| 19 |
./bin/bump-version.sh 0.3.1 |
| 20 |
``` |
| 21 |
|
| 22 |
Here `0.3.1` is the version number. Once ran, it'll change the version numbers and will add a sample changelog entry in the `readme.txt` file. |
| 23 |
|
| 24 |
## 2. Run build |
| 25 |
|
| 26 |
The build script will generate the CSS and JS files, language files, etc. for production. |
| 27 |
|
| 28 |
```bash |
| 29 |
yarn build |
| 30 |
``` |
| 31 |
|
| 32 |
## 3. Add Changelog |
| 33 |
|
| 34 |
Changelog is very crucial for customers. Make sure the changelog is human readable and understood by the customers and non-technical users. The `readme.txt` file will have a sample changelog entry from the `bump-version` command above, add details here. |
| 35 |
|
| 36 |
## 4. Commit the changes |
| 37 |
|
| 38 |
Once everything is done, we are ready to commit the changes. Commit the changes with a message like this: |
| 39 |
|
| 40 |
``` |
| 41 |
:bookmark: bumping version to VERSION_NUMBER |
| 42 |
``` |
| 43 |
|
| 44 |
Now push the changes to GitHub: `git push` |
| 45 |
|
| 46 |
## 5. Tag & Push |
| 47 |
|
| 48 |
In this last step, we need to tag our last commit so that it will trigger a deploy to WordPress.org. The `./bin/tag.sh` file makes it easier to tag and push the tag to GitHub. The tag name will be taken from the `Stable tag` in the `readme.txt` file. |
| 49 |
|
| 50 |
```bash |
| 51 |
./bin/tag.sh |
| 52 |
``` |
| 53 |
|
| 54 |
Done! |
| 55 |
|