Skip to content

Commit 01df0c2

Browse files
Upload release upon tagging with created assets.
Signed-off-by: Leander Stephen D'Souza <[email protected]>
1 parent 94538ef commit 01df0c2

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
name: Release
33

44
on:
5-
release:
6-
types: [created]
5+
push:
6+
tags:
7+
- '[0-9]+.[0-9]+.[0-9]+'
78

89
jobs:
910

@@ -43,9 +44,12 @@ jobs:
4344
rrp \
4445
bash -c "/ros_release_python/scripts/ros_release_python pip"
4546
46-
- name: Upload assets to release
47+
- name: Create Release with Assets
4748
run: |
48-
gh release upload ${{ github.event.release.tag_name }} dist/*
49+
gh release create "${{ github.ref_name }}" \
50+
--title "${{ github.ref_name }}" \
51+
--generate-notes \
52+
dist/*
4953
env:
5054
GH_TOKEN: ${{ github.token }}
5155

release_playbook.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,15 @@ This playbook outlines the steps to release a new version of the `vcs2l` project
2828
git push origin main
2929
```
3030

31-
## 2. Tagging the release
32-
After merging the PR, create a new tag for the release using the following commands:
33-
34-
```bash
35-
git checkout main
36-
git tag x.y.z
37-
git push origin x.y.z
38-
```
39-
40-
## 3. Publishing the release on GitHub
41-
* Navigate to the [Releases](https://github.com/ros-infrastructure/vcs2l/releases/new) page, and select the tag you just pushed.
42-
* Fill in the release title as `x.y.z`.
43-
* Create the release notes by using the `Generate release notes` button.
44-
* Publish the release by setting it as the latest release.
45-
* This will automatically trigger the GitHub Actions workflow to publish the package to PyPI.
31+
## 2. Tagging the release and automated publishing
32+
* After merging the PR, create a new tag for the repository using the following commands:
33+
34+
```bash
35+
git checkout main
36+
git tag x.y.z
37+
git push origin x.y.z
38+
```
39+
* Pushing the tag will automatically create a GitHub release with assets - `*.whl` and `*.tar.gz`.
40+
The release notes will be generated automatically based on the merged PRs since the last release.
41+
42+
* This would also publish the package onto PyPI with the newly created version.

0 commit comments

Comments
 (0)