You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ pyenv install 3.9.6 # select the latest patch version
@@ -40,9 +40,9 @@ $ pyenv rehash
40
40
41
41
Then, you can create a new [Virtual Environment](https://docs.python.org/3/tutorial/venv.html) specific to the Python version you just installed by running:
42
42
43
-
```bash
44
-
$ python -m venv env_3.9.6
45
-
$ source env_3.9.6/bin/activate
43
+
```sh
44
+
python -m venv env_3.9.6
45
+
source env_3.9.6/bin/activate
46
46
```
47
47
48
48
At this point you have a clean, Python-version-specific environment "activated" for
@@ -55,8 +55,8 @@ run `source env_3.9.6/bin/activate` again.
55
55
56
56
The last step is to install this project's dependencies and run all unit tests; to do so, you can run
57
57
58
-
```bash
59
-
$ ./scripts/run_validation.sh
58
+
```sh
59
+
./scripts/run_validation.sh
60
60
```
61
61
62
62
Also check out [how
@@ -73,20 +73,20 @@ When you make changes to this SDK, please write unit tests verifying if the chan
73
73
74
74
Run all the unit tests, code formatter, and code analyzer:
75
75
76
-
```bash
77
-
$ ./scripts/run_validation.sh
76
+
```sh
77
+
./scripts/run_validation.sh
78
78
```
79
79
80
80
Run all the unit tests (no formatter nor code analyzer):
- It is also possible to include `slack_sdk @ file:///<project path>/dist/slack_sdk-1.2.3-py2.py3-none-any.whl`in a [requirements.txt](https://pip.pypa.io/en/stable/user_guide/#requirements-files) file
@@ -131,75 +131,109 @@ See [`/docs/README`](https://github.com/slackapi/python-slack-sdk/blob/main/docs
131
131
132
132
The API reference is generated from a script. You can generate and preview the **API _reference_ documents for`slack_sdk` package modules** by running:
133
133
134
-
```bash
135
-
$ ./scripts/generate_api_docs.sh
134
+
```sh
135
+
./scripts/generate_api_docs.sh
136
136
```
137
137
138
138
### Releasing
139
139
140
-
1. Create the commit for the release:
140
+
#### test.pypi.org deployment
141
141
142
-
- Bump the version number in adherence to [Semantic Versioning](http://semver.org/) in`slack_sdk/version.py`.
143
-
- Build the reference docs with `./scripts/generate_api_docs.sh`.
144
-
- Create a branch for the release with `git checkout -b v2.5.0`
145
-
- Make a commit that includes the new version number: `git commit -a -m 'version 2.5.0'`.
146
-
- Open a PR and merge after receiving at least one approval from other maintainers.
142
+
[TestPyPI](https://test.pypi.org/) is a separate instance of the Python Package
143
+
Index that allows you to try distribution tools and processes without affecting
144
+
the real index. This is particularly useful when making changes related to the
145
+
package configuration itself, for example, modifications to the `pyproject.toml` file.
147
146
148
-
2. Distribute the release
147
+
You can deploy this project to TestPyPI using GitHub Actions.
149
148
150
-
- Use the latest stable Python runtime
151
-
- `python -m venv env`
152
-
- `./scripts/deploy_to_prod_pypi_org.sh`
153
-
- Create a new GitHub Release from the [Releases page](https://github.com/slackapi/python-slack-sdk/releases) by clicking the "Draft a new release" button.
154
-
- Enter the new version number updated from the commit (e.g. `v2.5.0`) into the "Choose a tag" input.
155
-
- Ensure the tag `Target` branch is `main` (e.g `Target:main`).
156
-
- Click the "Create a new tag: x.x.x on publish" button. This won't create your tag immediately.
157
-
- Name the release after the version number updated from the commit (e.g. `version 2.5.0`)
158
-
- Auto-generate the release notes by clicking the "Auto-generate release
159
-
notes" button. This will pull in changes that will be included in your
160
-
release.
161
-
- Edit the resulting notes to ensure they have decent messaging that are
162
-
understandable by non-contributors, but each commit should still have it's
163
-
own line.
164
-
- Ensure that this version adheres to [semantic versioning][semver]. See
165
-
[Versioning](#versioning-and-tags) for correct version format. Version tags
166
-
should match the following pattern: `v2.5.0`.
149
+
To deploy using GitHub Actions:
167
150
168
-
```markdown
169
-
Refer to [v{version} milestone](https://github.com/slackapi/python-slack-sdk/milestone/{TODO}?closed=1) to know the complete list of the issues resolved by this release.
151
+
1. Push your changes to a branch or tag
152
+
2. Navigate to <https://github.com/slackapi/python-slack-sdk/actions/workflows/pypi-release.yml>
153
+
3. Click on "Run workflow"
154
+
4. Select your branch or tag from the dropdown
155
+
5. Click "Run workflow" to build and deploy your branch to TestPyPI
170
156
171
-
**Updates**
157
+
Alternatively, you can deploy from your local machine with:
172
158
173
-
1. [WebClient] #111 Make an awesome change - Thanks @SlackHQ
174
-
2. [RTMClient] #222 Make an awesome change - Thanks @SlackAPI
175
-
176
-
**All Changes**
177
-
178
-
* All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/{milestone for the release}
179
-
* All changes: https://github.com/slackapi/python-slack-sdk/compare/{the previous release version tag}...{the release version tag}
180
-
```
181
-
182
-
- Close the milestone relating to the Release
183
-
- Create the next patch version Milestone. To be used by the following release.
184
-
185
-
3. (Slack Internal) Communicate the release internally
186
-
187
-
- Include a link to the GitHub release
188
-
189
-
4. Make announcements
190
-
191
-
- #slack-api in dev4slack.slack.com
192
-
- #lang-python in community.slack.com
193
-
194
-
5. (Slack Internal) Tweet by @SlackAPI
159
+
```sh
160
+
./scripts/deploy_to_test_pypi.sh
161
+
```
195
162
196
-
- Not necessary for patch updates, might be needed for minor updates, definitely needed for major updates. Include a link to the GitHub release
163
+
#### Development Deployment
164
+
165
+
Deploying a new version of this library to PyPI is triggered by publishing a GitHub Release.
166
+
Before creating a new release, ensure that everything on a stable branch has
167
+
landed, then [run the tests](#unit-tests).
168
+
169
+
1. Create the commit for the release
170
+
1. In `slack_sdk/version.py` bump the version number in adherence to [Semantic Versioning](http://semver.org/) and [Developmental Release](https://peps.python.org/pep-0440/#developmental-releases).
171
+
- Example: if the current version is `1.2.3`, a proper development bump would be `1.2.4.dev0`
172
+
- `.dev` will indicate to pip that this is a [Development Release](https://peps.python.org/pep-0440/#developmental-releases)
173
+
- Note that the `dev` version can be bumped in development releases: `1.2.4.dev0` ->`1.2.4.dev1`
174
+
2. Build the docs with `./scripts/generate_api_docs.sh`.
175
+
3. Commit with a message including the new version number. For example `1.2.4.dev0`& push the commit to a branch where the development release will live (create it if it does not exist)
176
+
1. `git checkout -b future-release`
177
+
2. `git commit -m 'chore(release): version 1.2.4.dev0'`
178
+
3. `git push -u origin future-release`
179
+
2. Create a new GitHub Release
180
+
1. Navigate to the [Releases page](https://github.com/slackapi/python-slack-sdk/releases).
181
+
2. Click the "Draft a new release" button.
182
+
3. Set the "Target" to the feature branch with the development changes.
183
+
4. Click "Tag: Select tag"
184
+
5. Input a new tag name manually. The tag name must match the version in`slack_sdk/version.py` prefixed with "v" (e.g., if version is `1.2.4.dev0`, enter `v1.2.4.dev0`)
185
+
6. Click the "Create a new tag" button. This won't create your tag immediately.
186
+
7. Click the "Generate release notes" button.
187
+
8. The release name should match the tag name!
188
+
9. Edit the resulting notes to ensure they have decent messaging that is understandable by non-contributors, but each commit should still have its own line.
189
+
10. Set this release as a pre-release.
190
+
11. Publish the release by clicking the "Publish release" button!
191
+
3. Navigate to the [release workflow run](https://github.com/slackapi/python-slack-sdk/actions/workflows/pypi-release.yml). You will need to approve the deployment!
192
+
4. After a few minutes, the corresponding version will be available on <https://pypi.org/project/slack-sdk>.
193
+
5. (Slack Internal) Communicate the release internally
194
+
195
+
#### Production Deployment
196
+
197
+
Deploying a new version of this library to PyPI is triggered by publishing a GitHub Release.
198
+
Before creating a new release, ensure that everything on the `main` branch since
199
+
the last tag is in a releasable state! At a minimum, [run the tests](#unit-tests).
200
+
201
+
1. Create the commit for the release
202
+
1. In `slack_sdk/version.py` bump the version number in adherence to [Semantic Versioning](http://semver.org/) and the [Versioning](#versioning-and-tags) section.
203
+
2. Build the docs with `./scripts/generate_api_docs.sh`.
204
+
3. Commit with a message including the new version number. For example `1.2.3` & push the commit to a branch and create a PR to sanity check.
205
+
1. `git checkout -b 1.2.3-release`
206
+
2. `git commit -m 'chore(release): version 1.2.3'`
207
+
3. `git push -u origin 1.2.3-release`
208
+
4. Add relevant labels to the PR and add the PR to a GitHub Milestone.
209
+
5. Merge in release PR after getting an approval from at least one maintainer.
210
+
2. Create a new GitHub Release
211
+
1. Navigate to the [Releases page](https://github.com/slackapi/python-slack-sdk/releases).
212
+
2. Click the "Draft a new release" button.
213
+
3. Set the "Target" to the `main` branch.
214
+
4. Click "Tag: Select tag"
215
+
5. Input a new tag name manually. The tag name must match the version in `slack_sdk/version.py` prefixed with "v" (e.g., if version is `1.2.3`, enter `v1.2.3`)
216
+
6. Click the "Create a new tag" button. This won't create your tag immediately.
217
+
7. Click the "Generate release notes" button.
218
+
8. The release name should match the tag name!
219
+
9. Edit the resulting notes to ensure they have decent messaging that is understandable by non-contributors, but each commit should still have its own line.
220
+
10. Include a link to the current GitHub Milestone.
221
+
11. Ensure the "latest release" checkbox is checked to mark this as the latest stable release.
222
+
12. Publish the release by clicking the "Publish release" button!
223
+
3. Navigate to the [release workflow run](https://github.com/slackapi/python-slack-sdk/actions/workflows/pypi-release.yml). You will need to approve the deployment!
224
+
4. After a few minutes, the corresponding version will be available on <https://pypi.org/project/slack-sdk>.
225
+
5. Close the current GitHub Milestone and create one for the next patch version.
226
+
6. (Slack Internal) Communicate the release internally
227
+
- Include a link to the GitHub release
228
+
7. (Slack Internal) Tweet by @SlackAPI
229
+
- Not necessary for patch updates, might be needed for minor updates,
230
+
definitely needed for major updates. Include a link to the GitHub release
197
231
198
232
## Workflow
199
233
200
234
### Versioning and Tags
201
235
202
-
This project uses semantic versioning, expressed through the numbering scheme of
236
+
This project uses [Semantic Versioning](http://semver.org/), expressed through the numbering scheme of
0 commit comments