Skip to content

Commit b4ca8e7

Browse files
zimeghello-ashleyintechmwbrooksWilliamBergamin
authored
chore: update steps taken to release a new latest tag and version (#439)
Co-authored-by: Ashley <12901850+hello-ashleyintech@users.noreply.github.com> Co-authored-by: Michael Brooks <michael@michaelbrooks.ca> Co-authored-by: William Bergamin <wbergamin@slack-corp.com>
1 parent b6f4640 commit b4ca8e7

2 files changed

Lines changed: 38 additions & 17 deletions

File tree

.github/maintainers_guide.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,39 @@ avoid accidently leaking tokens!
3030

3131
### Releasing
3232

33-
* Check the status of this project's GitHub Milestone to be released for issues that should be shipped with the release.
34-
- If all issues have been closed, continue with the release.
35-
- If issues are still open, discuss with the team about whether the open issues should be moved to a future release or if the release should be held off until the issues are resolved.
36-
- Take a look at all issues under the Milestone to make sure that the type of issues included aligns with the Milestone name based on [semantic versioning](https://semver.org/). If the issues do not align with the naming of the Milestone (ex: if the issues are all bug fixes, but the Milestone is labeled as a minor release), then you can tweak the Milestone name to reflect the correct versioning.
37-
* Update the version in `package.json`.
38-
* Update all references to versions in the README and in the workflow files under `example-workflows/` to refer to the latest release.
39-
* Run all tests using `npm test` to make sure the tests pass.
40-
* Commit the changes on your `main` branch.
41-
* Create a git tag for the new version. Should be in the format `v1.4.0`. `git tag v1.4.0`.
42-
* Push changes up to GitHub `git push origin main --tags`.
43-
* Create a GitHub Release based on the tag you just pushed up - this will trigger the publishing
44-
GitHub workflow.
45-
* Once released, make sure to close the relevant GitHub Milestone for the version you released.
33+
1. Check the status of this project's GitHub [Milestone](https://github.com/slackapi/slack-github-action/milestones) to be released for issues that should be shipped with the release.
34+
- If all issues have been closed, continue with the release.
35+
- If issues are still open, discuss with the team about whether the open issues should be moved to a future release or if the release should be held off until the issues are resolved.
36+
- Take a look at all issues under the Milestone to make sure that the type of issues included aligns with the Milestone name based on [semantic versioning](https://semver.org/). If the issues do not align with the naming of the Milestone (ex: if the issues are all bug fixes, but the Milestone is labeled as a minor release), then you can tweak the Milestone name to reflect the correct versioning.
37+
2. Checkout a branch for the release:
38+
39+
```sh
40+
$ git checkout -b v1.2.3
41+
```
42+
43+
3. Update the version in `package.json` and `package-lock.json` and examples:
44+
45+
```sh
46+
$ npm version <major|minor|patch> --no-git-tag-version
47+
```
48+
49+
4. Run all tests with the latest dependencies to make sure tests pass:
50+
51+
```sh
52+
$ npm ci
53+
$ npm test
54+
```
55+
56+
5. Commit the changes on your release branch and open a pull request with relevant labels:
57+
58+
```sh
59+
$ git commit -m "chore(release): tag version 1.2.3"
60+
$ git push -u origin v1.2.3
61+
```
62+
63+
6. After merging these changes into `main` create a new [release](https://github.com/slackapi/slack-github-action/releases/new) with a new tag - `v1.2.3` - on publish. Include relevant changes in the release notes!
64+
7. Rebuild [documentation](#docs) with the latest versions.
65+
8. Once released, make sure to close the relevant GitHub Milestone for the version you released.
4666

4767
## Workflow
4868

@@ -99,19 +119,19 @@ This repo contains two types of docs files:
99119

100120
The private repo containing the tools.slack.dev site pulls these in at build time.
101121

102-
Maintainers need to use the `run workflow` button associated with the `deploy` workflow in that private repo to update the docs with changes from here.
122+
Maintainers need to use the `run workflow` button associated with the `deploy` workflow in that private repo to update the docs with changes from here.
103123

104124
### Markdown Files
105125

106126
The markdown files here are secretly mdx files in disguise.
107127

108128
If you'd like to add images to pages, add the image files to the same folder the md file is in.
109129

110-
We appreciate markdown edits from anyone!!!
130+
We appreciate markdown edits from anyone!!!
111131

112132
### Sidebar
113133

114-
`_sidebar.json` sets the slack github action docs sidebar
134+
`_sidebar.json` sets the slack github action docs sidebar
115135

116136
sidebar values take the form of "slack-github-action/path-within-docs/"
117137

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"dev": "act public --eventpath .github/resources/.actions/event.json --secret-file .github/resources/.env --platform ubuntu-latest=node:20-buster --container-architecture linux/amd64",
1111
"lint:fix": "biome check --write",
1212
"lint": "biome check",
13-
"test": "c8 mocha test/*.spec.js"
13+
"test": "c8 mocha test/*.spec.js",
14+
"postversion": "TAG=\"v$(npm pkg get version | jq -r)\" && grep -rl 'slackapi/slack-github-action@v' ./docs ./example-workflows | xargs sed -i \"s|slackapi/slack-github-action@v.*|slackapi/slack-github-action@${TAG}|g\""
1415
},
1516
"repository": {
1617
"type": "git",

0 commit comments

Comments
 (0)