File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 needs : build
4949 runs-on : ubuntu-latest
5050 steps :
51+ - uses : actions/checkout@v4
52+ with :
53+ fetch-depth : 0
54+
5155 - uses : actions/download-artifact@v4
5256 with :
5357 path : dist
@@ -56,12 +60,23 @@ jobs:
5660 - working-directory : dist
5761 run : sha256sum otelcol-oxide-* > checksums.txt
5862
59- - uses : softprops/action-gh-release@v2
60- with :
61- files : |
62- dist/otelcol-oxide-*
63- dist/checksums.txt
64- generate_release_notes : true
63+ - name : Create or update release
64+ run : |
65+ PREV=$(git tag -l 'v*' --sort=-version:refname | sed -n '2p')
66+ NOTES_ARGS="--generate-notes"
67+ if [ -n "$PREV" ]; then
68+ NOTES_ARGS="$NOTES_ARGS --notes-start-tag $PREV"
69+ fi
70+ if gh release view ${{ github.ref_name }} > /dev/null 2>&1; then
71+ gh release upload ${{ github.ref_name }} \
72+ dist/otelcol-oxide-* dist/checksums.txt --clobber
73+ else
74+ gh release create ${{ github.ref_name }} \
75+ $NOTES_ARGS \
76+ dist/otelcol-oxide-* dist/checksums.txt
77+ fi
78+ env :
79+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6580
6681 docker :
6782 needs : build
Original file line number Diff line number Diff line change @@ -143,14 +143,16 @@ make test
143143
144144## Releasing
145145
146- To create a new release, first bump the versions in ` collector/manifest.yaml ` :
146+ To create a new release:
147147
148- - ` dist.version ` — the collector distribution version
149- - The receiver gomod version ( ` github.com/oxidecomputer/opentelemetry-collector-components ` )
150-
151- Then push a git tag matching ` v* ` (e.g. ` v0.2.0 ` ). This creates a new GitHub release, and publishes updated collector binaries and the Docker image .
148+ 1 . Bump the versions in ` collector/manifest.yaml ` and push to ` main ` :
149+ - ` dist.version ` : the collector distribution version
150+ - The receiver go.mod version ( ` github.com/oxidecomputer/opentelemetry-collector-components ` )
151+ 1 . Tag the commit and push the tag. The tag must point to a commit on ` main ` , or the release workflow will fail .
152152
153153``` bash
154154git tag v0.2.0
155155git push origin v0.2.0
156156```
157+
158+ This creates a new GitHub release, and publishes updated collector binaries and the Docker image.
You can’t perform that action at this time.
0 commit comments