|
1 | 1 | # Release steps |
2 | 2 |
|
3 | | -## 1. Create a release branch |
| 3 | +## 1. Bump plugin version |
4 | 4 |
|
5 | | -1. Before merging a feature, create a release branch for the next target version, e.g. |
| 5 | +1. When the version is ready for release, bump the version number in `vip-block-data-api.php`. Change plugin header and `WPCOMVIP__BLOCK_DATA_API__PLUGIN_VERSION` to match new version. |
| 6 | +2. PR version changes and merge to `trunk`. On version change, the release workflow will generate a new tag and release ZIP. |
6 | 7 |
|
7 | | - ```bash |
8 | | - git checkout trunk |
9 | | - git checkout -b planned-release/0.2.1 |
10 | | - ``` |
11 | | - |
12 | | -2. In GitHub, select the base branch as the `planned-release/...` branch. |
13 | | -3. Merge feature branches into the `planned-release/...` branch. |
14 | | - |
15 | | -## 2. Bump plugin version |
16 | | - |
17 | | -1. When the version is ready for release, inside the `planned-release/...` branch, bump the version number in `vip-block-data-api.php`. Change plugin header and `WPCOMVIP__BLOCK_DATA_API__PLUGIN_VERSION` to match new version. |
18 | | -2. Push the `planned-release/...` branch to GitHub. |
19 | | -3. PR version changes with feature changes and merge to `trunk`. |
20 | | - |
21 | | -## 3. Tag branch for release |
22 | | - |
23 | | -1. In `trunk`, add a signed tag for the release: |
24 | | - |
25 | | - ```bash |
26 | | - git checkout trunk |
27 | | - git pull |
28 | | - git tag -s -a <version> -m "Release <version>" |
29 | | -
|
30 | | - # e.g. git tag -s -a 1.0.2 -m "Release 1.0.2" |
31 | | - ``` |
32 | | - |
33 | | -2. Run `git push --tags`. |
34 | | - |
35 | | -## 4. Create a release |
36 | | - |
37 | | -1. In the `vip-block-data-api` folder, run this command to create a plugin ZIP: |
38 | | - |
39 | | - ```bash |
40 | | - git archive --prefix "vip-block-data-api/" <version> -o vip-block-data-api-<version>.zip |
41 | | -
|
42 | | - # e.g. git archive --prefix "vip-block-data-api/" 1.0.2 -o vip-block-data-api-1.0.2.zip |
43 | | - # |
44 | | - # Creates a ZIP archive with the prefix folder "vip-block-data-api/" containing files from tag 1.0.2 |
45 | | - ``` |
46 | | - |
47 | | -2. Visit the [vip-block-data-api create release page](https://github.com/Automattic/vip-block-data-api/releases/new). |
48 | | -3. Select the newly created version tag in the dropdown. |
49 | | -4. For the title, enter the release version name (e.g. `1.0.2`) |
50 | | -5. Add a description of release changes. |
51 | | -6. Attach the plugin ZIP. |
52 | | -7. Click "Publish release." |
53 | | - |
54 | | -## 5. Update integrations |
| 8 | +## 2. Update integrations |
55 | 9 |
|
56 | 10 | Patch updates (e.g. `1.2.3` -> `1.2.4`) do not require any additional steps. |
57 | 11 |
|
58 | | -This section applies if the plugin has increased by a minor (e.g. `1.2` -> `1.3`) or major (e.g. `1.2` -> `2.0`) version. |
| 12 | +This section applies if the plugin has increased by a minor (e.g. `1.2` -> `1.3`) or major (e.g. `1.2` -> `2.0`) version. |
59 | 13 |
|
60 | 14 | For an example updating an integration version, [see this mu-plugins PR](https://github.com/Automattic/vip-go-mu-plugins/pull/5409). |
61 | 15 |
|
|
0 commit comments