Skip to content
75 changes: 75 additions & 0 deletions .github/workflows/changelog_release.yaml
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
11 changes: 10 additions & 1 deletion .github/workflows/release_gh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,23 @@ jobs:
-f sha="${sha}" \
-f branch="main"

# Use CHANGELOG.md in root
# prerelease: true extracts the content between the first (## [Unreleased])
# and second H2 header,
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v2
with:
prerelease: true

# Upload artifacts to the newly created release.
# Prefix release version with "v".
- name: Create release
run: |
ls -R
gh release create "v$VERSION" \
--target "$GITHUB_REF_NAME" \
--generate-notes \
--notes '${{ steps.extract-release-notes.outputs.release_notes }}' \
"Capture-$VERSION.ios.zip" \
"Capture-$VERSION.doccarchive.ios.zip" \
"Capture-$VERSION.android.zip" \
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/update_sdk_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ on:
type: boolean
description: Ignore main branch requirement (SOC2 compliance)
required: true
workflow_call:
inputs:
version:
description: 'The new version to release, ex: 0.12.0'
required: true
type: string
emergency:
type: boolean
description: Ignore main branch requirement (SOC2 compliance)'
Copy link

Copilot AI Oct 31, 2025

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.

Suggested change
description: Ignore main branch requirement (SOC2 compliance)'
description: Ignore main branch requirement (SOC2 compliance)

Copilot uses AI. Check for mistakes.
required: true
jobs:
gh-release:
permissions:
Expand Down
76 changes: 76 additions & 0 deletions CHANGELOG.md
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
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release date 2025-10-27 appears to be in the future (October 27, 2025). This should likely be 2024-10-27 unless this is intentionally a future-dated release.

Suggested change
## [0.19.0] - 2025-10-27
## [0.19.0] - 2024-10-27

Copilot uses AI. Check for mistakes.
[0.19.0]: https://github.com/bitdriftlabs/capture-sdk/releases/tag/v0.19.0

### Both

**Added**

- Add support for free-tier bitdrift plans.

**Fixed**

- Improve performance of Feature Flags writes.

### Android

**Added**

- Add ANR detection for "App Start ANR".

**Fixed**

- Improve detection for "Service ANR" for when a Service takes too long to start.
- Fix inaccurate frame symbolication in some NDK crash stacktraces.

### iOS

**Fixed**

- Improve performance of Uptime clock computations which should improve the performance all across the SDK.
Loading