Skip to content

Commit 2a4802b

Browse files
committed
Enable prerelease channel
1 parent 9967222 commit 2a4802b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎.github/workflows/version.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,16 @@ jobs:
3535
run: |
3636
poetry version "${{ github.event.inputs.version }}"
3737
just version
38+
- name: Record prerelease channel
39+
env:
40+
VERSION: ${{ github.event.inputs.version }}
41+
run: |
42+
case "$VERSION" in
43+
*-*) channel="${VERSION#*-}"; channel="${channel%%.*}" ;;
44+
*) echo "Stable release, no channel note required."; exit 0 ;;
45+
esac
46+
git fetch origin "+refs/notes/semantic-release:refs/notes/semantic-release" || true
47+
git notes --ref semantic-release add --force \
48+
--message "{\"channels\":[\"$channel\"]}" "v$VERSION^{commit}"
49+
git push origin refs/notes/semantic-release
50+
echo "Recorded v$VERSION on the '$channel' channel."

0 commit comments

Comments
 (0)