-
Notifications
You must be signed in to change notification settings - Fork 10
release: Keep changelog notes separatedely #723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8f41570
release: Keep changelog notes separatedely
murki 49a879a
fix step name
murki df223d2
Apply suggestion from @snowp
murki a137eb0
Auto Release on Changelog Update
murki ddb67b7
Merge branch 'murki/BIT-6760' of github.com:bitdriftlabs/capture-sdk …
murki 830f75d
tmp test 1
murki fed64d7
test invalid release
murki d7c6439
fix permissions
murki 22f8fc0
test invalid release
murki e6c8f59
Make it more clear when a release is skipped
murki 703bca4
test invalid release
murki 40b26ae
test valid release
murki 476f6d4
clean-up and ready to ship
murki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: Auto Release on Changelog Update | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - 'CHANGELOG.md' | ||
|
|
||
| jobs: | ||
| prepare-release: | ||
| name: Extract version & check tag | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| version: ${{ steps.extract.outputs.version }} | ||
| should_release: ${{ steps.tagcheck.outputs.should_release }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # need tags | ||
|
|
||
| - name: Extract version from CHANGELOG.md | ||
| id: extract | ||
| run: | | ||
| second_h2_line=$(grep -E '^## \[' CHANGELOG.md | sed -n '2p') || true | ||
| if [ -z "$second_h2_line" ]; then | ||
| echo "Could not find second H2 header in CHANGELOG.md" >&2 | ||
| exit 1 | ||
| fi | ||
| # Support optional prerelease (-rc.1, -beta, etc) and build metadata (+build.5) per SemVer, no leading 'v'. | ||
| version=$(echo "$second_h2_line" | sed -E 's/^## \[([0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?)\].*/\1/') | ||
| if ! [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then | ||
| echo "Parsed version '$version' is not a valid SEMVER" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "version=$version" >> "$GITHUB_OUTPUT" | ||
| echo "Extracted version: $version" | ||
|
|
||
| - name: Check if tag already exists | ||
| id: tagcheck | ||
| run: | | ||
| version_tag="v${{ steps.extract.outputs.version }}" | ||
| if git ls-remote --exit-code --tags origin "$version_tag" >/dev/null 2>&1; then | ||
| echo "Tag $version_tag already exists. Skipping release." >&2 | ||
| echo "should_release=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "Tag $version_tag does not exist. Will release." >&2 | ||
| echo "should_release=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| - name: Emit skip notice | ||
| if: steps.tagcheck.outputs.should_release == 'false' | ||
| run: | | ||
| echo "::notice title=Release skipped::Tag v${{ steps.extract.outputs.version }} already exists. No release will be created." | ||
|
|
||
| run-release: | ||
| name: Run Release workflow | ||
| needs: prepare-release | ||
| if: needs.prepare-release.outputs.should_release == 'true' | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| uses: ./.github/workflows/update_sdk_version.yaml | ||
| with: | ||
| version: ${{ needs.prepare-release.outputs.version }} | ||
| emergency: false | ||
|
|
||
| no-release: | ||
| name: No release (tag exists) | ||
| needs: prepare-release | ||
| if: needs.prepare-release.outputs.should_release == 'false' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Summary | ||
| run: | | ||
| echo "Tag v${{ needs.prepare-release.outputs.version }} already exists. Release workflow not invoked." >> $GITHUB_STEP_SUMMARY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,76 @@ | ||||||
| # Change Log | ||||||
|
|
||||||
| ## [Unreleased] | ||||||
| [Unreleased]: https://github.com/bitdriftlabs/capture-sdk/compare/v0.19.0...HEAD | ||||||
|
|
||||||
| ### Both | ||||||
|
|
||||||
| **Added** | ||||||
|
|
||||||
| - Add API to clear all feature flags. | ||||||
|
|
||||||
| **Changed** | ||||||
|
|
||||||
| - Nothing yet! | ||||||
|
|
||||||
| **Fixed** | ||||||
|
|
||||||
| - Add back the ability to disable the Session Replay feature at SDK initialization. | ||||||
|
|
||||||
| ### Android | ||||||
|
|
||||||
| **Added** | ||||||
|
|
||||||
| - Nothing yet! | ||||||
|
|
||||||
| **Changed** | ||||||
|
|
||||||
| - Nothing yet! | ||||||
|
|
||||||
| **Fixed** | ||||||
|
|
||||||
| - Nothing yet! | ||||||
|
|
||||||
| ### iOS | ||||||
|
|
||||||
| **Added** | ||||||
|
|
||||||
| - Nothing yet! | ||||||
|
|
||||||
| **Changed** | ||||||
|
|
||||||
| - Nothing yet! | ||||||
|
|
||||||
| **Fixed** | ||||||
|
|
||||||
| - Nothing yet! | ||||||
|
|
||||||
| ## [0.19.0] - 2025-10-27 | ||||||
|
||||||
| ## [0.19.0] - 2025-10-27 | |
| ## [0.19.0] - 2024-10-27 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra closing single quote at the end of the description string.