Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/four-news-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"posthog_flutter": patch
---

chore: test new release process
42 changes: 34 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ permissions:
contents: read

on:
pull_request:
types: [closed]
push:
branches: [main]
workflow_dispatch:

Expand All @@ -18,23 +17,50 @@ jobs:
check-changesets:
name: Check for changesets
runs-on: ubuntu-latest
# Run when PR with 'release' label is merged to main, or when manually triggered
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request'
&& github.event.pull_request.merged == true
&& contains(github.event.pull_request.labels.*.name, 'release'))
# Run when a push to main comes from a merged PR with the 'release' label, or when manually triggered
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
outputs:
has-changesets: ${{ steps.check.outputs.has-changesets }}
steps:
- name: Check for release label on merged PR
if: github.event_name == 'push'
id: check-label
env:
GH_TOKEN: ${{ github.token }}
run: |
# Find the PR associated with this merge commit
COMMIT_SHA="${{ github.sha }}"
PR_NUMBER=$(gh api "/repos/${{ github.repository }}/commits/${COMMIT_SHA}/pulls" --jq '.[0].number // empty')

if [ -z "$PR_NUMBER" ]; then
echo "No PR found for commit ${COMMIT_SHA}. Skipping release."
echo "has-release-label=false" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "Found PR #${PR_NUMBER} for commit ${COMMIT_SHA}"

# Check if the PR has the 'release' label
HAS_LABEL=$(gh api "/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels" --jq '[.[] | select(.name == "release")] | length')

if [ "$HAS_LABEL" -gt 0 ]; then
echo "✓ PR #${PR_NUMBER} has the 'release' label"
echo "has-release-label=true" >> "$GITHUB_OUTPUT"
else
echo "PR #${PR_NUMBER} does not have the 'release' label. Skipping release."
echo "has-release-label=false" >> "$GITHUB_OUTPUT"
fi

- name: Checkout repository
if: github.event_name == 'workflow_dispatch' || steps.check-label.outputs.has-release-label == 'true'
uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0

- name: Check for changesets
id: check
if: github.event_name == 'workflow_dispatch' || steps.check-label.outputs.has-release-label == 'true'
run: |
if [ ! -d ".changeset" ] || [ -z "$(ls -A .changeset/*.md 2>/dev/null | grep -v README.md)" ]; then
echo "❌ No changesets found. Cannot proceed with release."
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -633,3 +633,6 @@ posthog_flutter.iml

# pod files
Podfile.lock

# https://nightshift.haplab.com/
PLAN.md
6 changes: 0 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# 5.15.0

## 5.15.1

### Patch Changes

- c1ca046: chore: test new release process

- fix: add explicit `package:meta/meta.dart` import for `@internal` annotation ([#286](https://github.com/PostHog/posthog-flutter/issues/286))
- feat: add `setPersonProperties` method to set person properties without requiring `identify` ([#284](https://github.com/PostHog/posthog-flutter/pull/284))
- fix: add `filled: false` to survey open-text questions to prevent app theme from overriding survey customization values ([#285](https://github.com/PostHog/posthog-flutter/pull/285))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.posthog.flutter

internal val postHogVersion = "5.15.1"
internal val postHogVersion = "5.15.0"
2 changes: 1 addition & 1 deletion ios/Classes/PostHogFlutterVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
import Foundation

// This property is internal only
let postHogFlutterVersion = "5.15.1"
let postHogFlutterVersion = "5.15.0"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posthog_flutter",
"version": "5.15.1",
"version": "5.15.0",
"private": true,
"description": "Version tracking for changesets - the canonical version is in pubspec.yaml",
"packageManager": "pnpm@10.29.3",
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: posthog_flutter
description: Flutter implementation of PostHog client for iOS, Android and Web
version: 5.15.1
version: 5.15.0
homepage: https://www.posthog.com
repository: https://github.com/posthog/posthog-flutter
issue_tracker: https://github.com/posthog/posthog-flutter/issues
Expand Down
Loading