Skip to content

Commit 40f475f

Browse files
authored
Merge pull request #1004 from betatim/setup-monthly-releases
2 parents 45229ad + 2c3e7dc commit 40f475f

File tree

5 files changed

+46
-105
lines changed

5 files changed

+46
-105
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Create a release on pypi.org
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build-n-publish:
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: "Setup Python 3.8"
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: "3.8"
17+
18+
- name: "Install dependencies"
19+
run: |
20+
pip install --upgrade setuptools pip
21+
pip install --upgrade -r dev-requirements.txt
22+
pip freeze
23+
24+
- name: "Build distribution archives"
25+
run: |
26+
python setup.py sdist bdist_wheel
27+
28+
# This step is only run when a new tag is pushed
29+
# all previous steps always run in order to exercise them
30+
- name: Publish distribution to PyPI
31+
if: startsWith(github.ref, 'refs/tags')
32+
uses: pypa/gh-action-pypi-publish@master
33+
with:
34+
password: ${{ secrets.PYPI_API_TOKEN }}

.travis.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ There are a few other pages to highlight:
2323
Its a good place to understand _why_ the team have made the decisions that they have along the way!
2424
* We absolutely encourage discussion around refactoring, updating or extending repo2docker, but please make sure that you've understood this page before opening an issue to discuss the change you'd like to propose.
2525
* [Common developer tasks and how-tos](https://repo2docker.readthedocs.io/en/latest/contributing/tasks.html)
26-
* Some notes on running tests, buildpack dependencies, creating a release, updating the changelog and keeping the pip files up to date.
26+
* Some notes on running tests, buildpack dependencies, creating a release, and keeping the pip files up to date.

docs/source/contributing/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ This outlines the process for getting changes to the repo2docker project merged.
6161
3. Make edits in [your fork](https://help.github.com/en/articles/fork-a-repo) of the [repo2docker repository](https://github.com/jupyterhub/repo2docker).
6262
4. Make a [pull request](https://help.github.com/en/articles/about-pull-requests).
6363
Read the [next section](#guidelines-to-getting-a-pull-request-merged) for guidelines for both reviewers and contributors on merging a PR.
64-
5. Edit [the changelog](./../../changelog) by appending your feature / bug fix to the development version.
6564
6. Wait for a community member to merge your changes.
6665
Remember that **someone else must merge your pull request**.
6766
That goes for new contributors and long term maintainers alike.
67+
Because `master` is continuously deployed to mybinder.org it is essential
68+
that `master` is always in a deployable state.
6869
7. (optional) Deploy a new version of repo2docker to mybinder.org by [following these steps](http://mybinder-sre.readthedocs.io/en/latest/deployment/how.html)
6970

7071
## Guidelines to getting a Pull Request merged
@@ -84,7 +85,6 @@ These are not hard rules to be enforced by 🚓 but they are suggestions written
8485
This makes it easier to find all changes since the last deployment `git log --merges --pretty=format:"%h %<(10,trunc)%an %<(15)%ar %s" <deployed-revision>..` and your PR easier to review.
8586
* **Make it clear when your PR is ready for review.**
8687
Prefix the title of your pull request (PR) with `[MRG]` if the contribution is complete and should be subjected to a detailed review.
87-
* **Enter your changes into the [changelog](./../../changelog)** in `docs/source/changelog.rst`.
8888
* **Use commit messages to describe _why_ you are proposing the changes you are proposing.**
8989
* **Try to not rush changes** (the definition of rush depends on how big your changes are).
9090
Remember that everyone in the repo2docker team is a volunteer and we can not (nor would we want to) control their time or interests.

docs/source/contributing/tasks.md

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -113,41 +113,35 @@ added and why. If you fix a bug or add new functionality consider adding a new
113113
test to prevent the bug from coming back/the feature breaking in the future.
114114
115115
116-
117116
## Creating a Release
118117
119-
We try to make a release of repo2docker every few months if possible.
120-
121-
We follow [semantic versioning](https://semver.org/).
118+
We make a release of whatever is on `master` every month. We use "calendar versioning".
119+
Monthly releases give users a predictable pattern for when releases are going to
120+
happen and prevents locking up improvements for fixes for long periods of time.
122121
123122
A new release will automatically be created when a new git tag is created
124-
and pushed to the repository (using
125-
[Travis CI](https://github.com/jupyterhub/repo2docker/blob/master/.travis.yml#L52)).
123+
and pushed to the repository.
126124
127125
To create a new release, follow these steps:
128126
129-
### Confirm that the changelog is ready
130-
131-
[The changelog](https://github.com/jupyterhub/repo2docker/blob/master/docs/source/changelog.rst)
132-
should reflect all significant enhancements and fixes to repo2docker and
133-
its documentation. In addition, ensure that the correct version is displayed
134-
at the top, and create a new `dev` section if needed.
135-
136127
### Create a new tag and push it
137128
138129
First, tag a new release locally:
139130
140131
```bash
141-
V=0.7.0; git tag -am "release $V" $V
132+
V=YYYY.MM.0; git tag -am "release $V" $V
142133
```
143134

135+
> If you need to make a second (or third) release in a month increment the
136+
> trailing 0 of the version to 1 (or 2).
137+
144138
Then push this change up to the master repository
145139

146140
```
147141
git push origin --tags
148142
```
149143

150-
Travis should automatically run the tests and, if they pass, create a
144+
GitHub Actions should create a
151145
new release on the [repo2docker PyPI](https://pypi.org/project/jupyter-repo2docker/).
152146
Once this has completed, make sure that the new version has been updated.
153147

@@ -159,51 +153,10 @@ release on the [GitHub repository releases page](https://github.com/jupyterhub/r
159153
* Click "Draft a new release"
160154
* Choose a tag version using the same tag you just created above
161155
* The release name is simply the tag version
162-
* The description is [a link to the Changelog](https://github.com/jupyterhub/repo2docker/blob/master/docs/source/changelog.rst),
163-
ideally with an anchor to the latest release.
164156
* Finally, click "Publish release"
165157

166158
That's it!
167159

168-
## Update the change log
169-
170-
To add your change to the change log, find the relevant Feature/Bug
171-
fix/API change section for the next release near the top of the file;
172-
then add one or two sentences as a new bullet point about your
173-
changes. Include the pull request or issue number between square
174-
brackets at the end.
175-
176-
Some details:
177-
178-
- versioning follows the x.y.z, major.minor.bugfix numbering
179-
180-
- bug fixes go into the next bugfix release. If there isn't any, you
181-
can create a new section (see point below). Don't worry if you're
182-
not sure about that, and think it should go into a next major or
183-
minor release: an admin will let you know, or move the change later
184-
to the appropriate section
185-
186-
- API changes should preferably go into the next major release, unless
187-
they are backward compatible (for example, a deprecated function
188-
keyword): then they can go into the next minor release. For release
189-
with major release 0, non-backward compatible breaking changes are
190-
also fine for the next minor release.
191-
192-
- new features should go into the next minor release.
193-
194-
- if there is no section for the appropriate release, you can add one:
195-
196-
follow the versioning scheme, by simply increasing the relevant
197-
number for one of the major /minor/bugfix numbers, appropriate for
198-
your change (see the above bullet points); add the release
199-
section. Then add three subsections: new features, api changes, and
200-
bug fixes. Leave out the sections that are not appropriate for the
201-
newlye added release section.
202-
203-
Release candidate versions in the change log are only temporary, and
204-
should be superseded by either a next release candidate, or the final
205-
release for that version (bugfix version 0).
206-
207160

208161
## Keeping the Pipfile and requirements files up to date
209162

0 commit comments

Comments
 (0)