mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
* feat(macos): add CollectionBehavior option to MacWindow (#4756) Add configurable NSWindowCollectionBehavior support for macOS windows, allowing control over window behavior across Spaces and fullscreen. New options include: - MacWindowCollectionBehaviorCanJoinAllSpaces - MacWindowCollectionBehaviorFullScreenAuxiliary - MacWindowCollectionBehaviorMoveToActiveSpace - And more... This enables building Spotlight-like apps that appear on all Spaces or overlay fullscreen applications. Closes #4756 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Potential fix for code scanning alert no. 140: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 139: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * feat(examples): add spotlight example for CollectionBehavior Demonstrates creating a Spotlight-like launcher window that: - Appears on all macOS Spaces - Floats above other windows - Uses accessory activation policy (no Dock icon) - Has frameless translucent design 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat(macos): support bitwise OR for CollectionBehavior options Update CollectionBehavior to use actual NSWindowCollectionBehavior bitmask values, allowing multiple behaviors to be combined: ```go CollectionBehavior: application.MacWindowCollectionBehaviorCanJoinAllSpaces | application.MacWindowCollectionBehaviorFullScreenAuxiliary, ``` Changes: - Update Go constants to use actual bitmask values (1<<0, 1<<1, etc.) - Simplify C function to pass through combined bitmask directly - Add ParticipatesInCycle, IgnoresCycle, FullScreenDisallowsTiling options - Update documentation with combined behavior examples - Update spotlight example to demonstrate combining behaviors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
218 lines
No EOL
7.9 KiB
YAML
218 lines
No EOL
7.9 KiB
YAML
name: Test Nightly Releases (Dry Run)
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry_run:
|
|
description: 'Run in dry-run mode (no actual releases)'
|
|
required: false
|
|
default: true
|
|
type: boolean
|
|
test_branch:
|
|
description: 'Branch to test against'
|
|
required: false
|
|
default: 'master'
|
|
type: string
|
|
|
|
env:
|
|
GO_VERSION: '1.24'
|
|
|
|
jobs:
|
|
test-permissions:
|
|
name: Test Release Permissions
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
authorized: ${{ steps.check.outputs.authorized }}
|
|
steps:
|
|
- name: Check if user is authorized
|
|
id: check
|
|
run: |
|
|
# Test authorization logic
|
|
AUTHORIZED_USERS="leaanthony"
|
|
|
|
if [[ "$AUTHORIZED_USERS" == *"${{ github.actor }}"* ]]; then
|
|
echo "✅ User ${{ github.actor }} is authorized"
|
|
echo "authorized=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "❌ User ${{ github.actor }} is not authorized"
|
|
echo "authorized=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
test-changelog-extraction:
|
|
name: Test Changelog Extraction
|
|
runs-on: ubuntu-latest
|
|
needs: test-permissions
|
|
if: needs.test-permissions.outputs.authorized == 'true'
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.inputs.test_branch }}
|
|
fetch-depth: 0
|
|
|
|
- name: Test v2 changelog extraction
|
|
run: |
|
|
echo "🧪 Testing v2 changelog extraction..."
|
|
CHANGELOG_FILE="website/src/pages/changelog.mdx"
|
|
|
|
if [ ! -f "$CHANGELOG_FILE" ]; then
|
|
echo "❌ v2 changelog file not found"
|
|
exit 1
|
|
fi
|
|
|
|
# Extract unreleased section
|
|
awk '
|
|
/^## \[Unreleased\]/ { found=1; next }
|
|
found && /^## / { exit }
|
|
found && !/^$/ { print }
|
|
' $CHANGELOG_FILE > v2_release_notes.md
|
|
|
|
echo "📝 v2 changelog content (first 10 lines):"
|
|
head -10 v2_release_notes.md || echo "No content found"
|
|
echo "Total lines: $(wc -l < v2_release_notes.md)"
|
|
|
|
- name: Test v3 changelog extraction (if accessible)
|
|
run: |
|
|
echo "🧪 Testing v3 changelog extraction..."
|
|
|
|
if git show v3-alpha:docs/src/content/docs/changelog.mdx > /dev/null 2>&1; then
|
|
echo "✅ v3 changelog accessible"
|
|
|
|
git show v3-alpha:docs/src/content/docs/changelog.mdx | awk '
|
|
/^## \[Unreleased\]/ { found=1; next }
|
|
found && /^## / { exit }
|
|
found && !/^$/ { print }
|
|
' > v3_release_notes.md
|
|
|
|
echo "📝 v3 changelog content (first 10 lines):"
|
|
head -10 v3_release_notes.md || echo "No content found"
|
|
echo "Total lines: $(wc -l < v3_release_notes.md)"
|
|
else
|
|
echo "⚠️ v3 changelog not accessible from current context"
|
|
fi
|
|
|
|
test-version-detection:
|
|
name: Test Version Detection
|
|
runs-on: ubuntu-latest
|
|
needs: test-permissions
|
|
if: needs.test-permissions.outputs.authorized == 'true'
|
|
outputs:
|
|
v2_current_version: ${{ steps.versions.outputs.v2_current }}
|
|
v2_next_patch: ${{ steps.versions.outputs.v2_next_patch }}
|
|
v2_next_minor: ${{ steps.versions.outputs.v2_next_minor }}
|
|
v2_next_major: ${{ steps.versions.outputs.v2_next_major }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Test version detection logic
|
|
id: versions
|
|
run: |
|
|
echo "🧪 Testing version detection..."
|
|
|
|
# Test v2 version parsing
|
|
if [ -f "v2/cmd/wails/internal/version.txt" ]; then
|
|
CURRENT_V2=$(cat v2/cmd/wails/internal/version.txt | sed 's/^v//')
|
|
echo "Current v2 version: v$CURRENT_V2"
|
|
echo "v2_current=v$CURRENT_V2" >> $GITHUB_OUTPUT
|
|
|
|
# Parse and increment
|
|
IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_V2"
|
|
MAJOR=${VERSION_PARTS[0]}
|
|
MINOR=${VERSION_PARTS[1]}
|
|
PATCH=${VERSION_PARTS[2]}
|
|
|
|
PATCH_VERSION="v$MAJOR.$MINOR.$((PATCH + 1))"
|
|
MINOR_VERSION="v$MAJOR.$((MINOR + 1)).0"
|
|
MAJOR_VERSION="v$((MAJOR + 1)).0.0"
|
|
|
|
echo "v2_next_patch=$PATCH_VERSION" >> $GITHUB_OUTPUT
|
|
echo "v2_next_minor=$MINOR_VERSION" >> $GITHUB_OUTPUT
|
|
echo "v2_next_major=$MAJOR_VERSION" >> $GITHUB_OUTPUT
|
|
|
|
echo "✅ Patch: v$CURRENT_V2 → $PATCH_VERSION"
|
|
echo "✅ Minor: v$CURRENT_V2 → $MINOR_VERSION"
|
|
echo "✅ Major: v$CURRENT_V2 → $MAJOR_VERSION"
|
|
else
|
|
echo "❌ v2 version file not found"
|
|
fi
|
|
|
|
test-commit-analysis:
|
|
name: Test Commit Analysis
|
|
runs-on: ubuntu-latest
|
|
needs: test-permissions
|
|
if: needs.test-permissions.outputs.authorized == 'true'
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Test commit analysis
|
|
run: |
|
|
echo "🧪 Testing commit analysis..."
|
|
|
|
# Get recent commits for testing
|
|
echo "Recent commits:"
|
|
git log --oneline -10
|
|
|
|
# Test conventional commit detection
|
|
RECENT_COMMITS=$(git log --oneline --since="7 days ago")
|
|
echo "Commits from last 7 days:"
|
|
echo "$RECENT_COMMITS"
|
|
|
|
# Analyze for release type
|
|
RELEASE_TYPE="patch"
|
|
if echo "$RECENT_COMMITS" | grep -q "feat!\|fix!\|BREAKING CHANGE:"; then
|
|
RELEASE_TYPE="major"
|
|
elif echo "$RECENT_COMMITS" | grep -q "feat\|BREAKING CHANGE"; then
|
|
RELEASE_TYPE="minor"
|
|
fi
|
|
|
|
echo "✅ Detected release type: $RELEASE_TYPE"
|
|
|
|
test-summary:
|
|
name: Test Summary
|
|
runs-on: ubuntu-latest
|
|
needs: [test-permissions, test-changelog-extraction, test-version-detection, test-commit-analysis]
|
|
if: always()
|
|
steps:
|
|
- name: Print test results
|
|
run: |
|
|
echo "# 🧪 Nightly Release Workflow Test Results" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
|
|
if [ "${{ needs.test-permissions.result }}" == "success" ]; then
|
|
echo "✅ **Permissions Test**: Passed" >> $GITHUB_STEP_SUMMARY
|
|
else
|
|
echo "❌ **Permissions Test**: Failed" >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
|
|
if [ "${{ needs.test-changelog-extraction.result }}" == "success" ]; then
|
|
echo "✅ **Changelog Extraction**: Passed" >> $GITHUB_STEP_SUMMARY
|
|
else
|
|
echo "❌ **Changelog Extraction**: Failed" >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
|
|
if [ "${{ needs.test-version-detection.result }}" == "success" ]; then
|
|
echo "✅ **Version Detection**: Passed" >> $GITHUB_STEP_SUMMARY
|
|
echo " - Current v2: ${{ needs.test-version-detection.outputs.v2_current_version }}" >> $GITHUB_STEP_SUMMARY
|
|
echo " - Next patch: ${{ needs.test-version-detection.outputs.v2_next_patch }}" >> $GITHUB_STEP_SUMMARY
|
|
echo " - Next minor: ${{ needs.test-version-detection.outputs.v2_next_minor }}" >> $GITHUB_STEP_SUMMARY
|
|
echo " - Next major: ${{ needs.test-version-detection.outputs.v2_next_major }}" >> $GITHUB_STEP_SUMMARY
|
|
else
|
|
echo "❌ **Version Detection**: Failed" >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
|
|
if [ "${{ needs.test-commit-analysis.result }}" == "success" ]; then
|
|
echo "✅ **Commit Analysis**: Passed" >> $GITHUB_STEP_SUMMARY
|
|
else
|
|
echo "❌ **Commit Analysis**: Failed" >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "**Note**: This was a dry-run test. No actual releases were created." >> $GITHUB_STEP_SUMMARY |