Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 32 additions & 13 deletions .github/maintainers_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,38 @@ avoid accidently leaking tokens!

### Releasing

* Check the status of this project's GitHub Milestone to be released for issues that should be shipped with the release.
- If all issues have been closed, continue with the release.
- 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.
- 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.
* Update the version in `package.json`.
* Update all references to versions in the README and in the workflow files under `example-workflows/` to refer to the latest release.
* Run all tests using `npm test` to make sure the tests pass.
* Commit the changes on your `main` branch.
* Create a git tag for the new version. Should be in the format `v1.4.0`. `git tag v1.4.0`.
* Push changes up to GitHub `git push origin main --tags`.
* Create a GitHub Release based on the tag you just pushed up - this will trigger the publishing
GitHub workflow.
* Once released, make sure to close the relevant GitHub Milestone for the version you released.
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.
- If all issues have been closed, continue with the release.
- 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.
- 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.
2. Checkout a branch for the release:

```sh
$ git checkout -b v1.2.3
```

3. Update the version in `package.json` and `package-lock.json`:

```sh
$ npm version <major|minor|patch> --no-git-tag-version
```
Comment on lines +45 to +47
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: TIL


4. Run all tests with the latest dependencies to make sure tests pass:

```sh
$ npm ci
$ npm test
```

5. Commit the changes on your release branch and open a pull request with relevant labels:

```sh
$ git commit -m "chore(release): tag version 1.2.3"
$ git push -u origin v1.2.3
```

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!
7. Once released, make sure to close the relevant GitHub Milestone for the version you released.

## Workflow

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"dev": "act public --eventpath .github/resources/.actions/event.json --secret-file .github/resources/.env --platform ubuntu-latest=node:20-buster --container-architecture linux/amd64",
"lint:fix": "biome check --write",
"lint": "biome check",
"test": "c8 mocha test/*.spec.js"
"test": "c8 mocha test/*.spec.js",
"version": "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\""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Do we want to use version or postversion? The postversion would run this after npm's default version command.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwbrooks Thanks for pointing this out πŸ‘οΈβ€πŸ—¨οΈ ✨

I was noticing similar behavior with both options, but agree postversion can be more clear that these changes are meant to happen after the packaging updates otherwise.

Avoiding automatic commits and tags for now seems best too - this is stressful magic I find - which could be added to these hooks also at a later point! 🎁

},
"repository": {
"type": "git",
Expand Down
Loading