Skip to content

Commit 4853a44

Browse files
committed
Update release actions to working version
1 parent 0096247 commit 4853a44

3 files changed

Lines changed: 20 additions & 30 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
name: "Draft release when pushing to main"
1+
name: "Draft release when pushing new tag"
22

33
on: # yamllint disable-line rule:truthy
44
push:
5-
branches:
6-
- "main"
5+
tags:
6+
- "v*"
77

88
jobs:
99
pre-release:
1010
name: "Draft release"
1111
runs-on: "ubuntu-latest"
1212

1313
steps:
14-
- uses: "marvinpinto/action-automatic-releases@v1.1.2"
14+
- uses: "marvinpinto/action-automatic-releases@v1.2.0"
1515
with:
1616
repo_token: "${{ secrets.GITHUB_TOKEN }}"
17-
automatic_release_tag: "latest"
1817
draft: True
1918
prerelease: False
20-
title: "Change this to vX.Y.Z"

.github/workflows/release.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@ jobs:
1818
- uses: actions/setup-python@v2
1919
with:
2020
python-version: 3.8
21-
- uses: battila7/get-version-action@v2
22-
- name: Update version.txt
23-
run: |
24-
echo ${{ steps.get_version.outputs.version-without-v }} > speechbrain/version.txt
25-
git config user.name github-actions
26-
git config user.email [email protected]
27-
git add speechbrain/version.txt
28-
git commit -m 'Auto-update version.txt'
29-
git push
3021
- name: Install pypa/build
3122
run: python -m pip install build --user
3223
- name: Build binary wheel and source tarball

docs/contributing.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,23 +186,24 @@ of what this would likely mean:
186186
* Added classes or features warrant a minor version bump. Most weekly updates should fall into this.
187187
* Patch version bumps should happen only for bug fixes.
188188

189-
When releasing a new version, there are only two user-initiated action that need to occur.
190-
First, the `develop` branch should be merged to the `main` branch. This means that
191-
the `main` branch now includes the latest changes to the repository. Second,
192-
the `main` branch should be tagged with the new version. This is done by
193-
navigating to the `Releases` page, drafting a new release, and publishing it.
194-
195-
The published release should include a summary of changes from the prior
196-
version. We have created a GitHub action that is run when the `develop`
197-
branch is merged with the `main` branch that creates a draft release
198-
titled "Latest". This draft release should include commits since
199-
the previous release, but will require some editing to summarize or
200-
highlight important changes.
201-
189+
When releasing a new version, there are a few user-initiated action that need to occur.
190+
1. On the `develop` branch, update `speechbrain/version.txt` to say the new version:
191+
X.Y.Z
192+
2. Merge the `develop` branch into the `main` branch:
193+
git checkout main
194+
git merge develop
195+
3. Push the `main` branch to github:
196+
git push
197+
4. Tag the `main` branch with the new version:
198+
git tag vX.Y.Z
199+
5. Push the new tag to github:
200+
git push --tags
201+
202+
This kicks off an automatic action that creates a draft release with release notes.
203+
Review the notes to make sure they make sense and remove commits that aren't important.
204+
You can then publish the release to make it public.
202205
Publishing a new release kicks off a series of automatic tools, listed below:
203206

204-
* The file `version.txt` gets updated with the version (excluding "v") named
205-
in the release. This update gets pushed to both `main` and `develop` branches.
206207
* The `main` branch is checked out and used for building a python package.
207208
* The built package is uploaded to PyPI and the release is published there.
208209
* Read the Docs uses Webhooks to get notified when a new version is published.

0 commit comments

Comments
 (0)