From 0015f8d3cb62750ac3b25cf541146b9ec71cc6f5 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Sat, 16 Aug 2025 14:42:05 +1000
Subject: [PATCH 01/99] chore: update sponsors.svg (#4512)
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
---
website/static/img/sponsors.svg | 241 ++++++++++++++++----------------
1 file changed, 124 insertions(+), 117 deletions(-)
diff --git a/website/static/img/sponsors.svg b/website/static/img/sponsors.svg
index d1ef7bbff..3fe94dd68 100644
--- a/website/static/img/sponsors.svg
+++ b/website/static/img/sponsors.svg
@@ -1,4 +1,4 @@
-
```
-The [BulletinBoard](https://github.com/raguay/BulletinBoard) application is a versital message board for static messages or dialogs to get information from the user for a script. It has a TUI for creating new dialogs that can latter be used to get information from the user. It's design is to stay running on your system and show the information as needed and then hide away. I have a process for watching a file on my system and sending the contents to BulletinBoard when changed. It works great with my workflows. There is also an [Alfred workflow](https://github.com/raguay/MyAlfred/blob/master/Alfred%205/EmailIt.alfredworkflow) for sending information to the program. The workflow is also for working with [EmailIt](https://github.com/raguay/EmailIt).
+The [BulletinBoard](https://github.com/raguay/BulletinBoard) application is a versatile message board for static messages or dialogs to get information from the user for a script. It has a TUI for creating new dialogs that can later be used to get information from the user. It's designed to stay running on your system and show the information as needed and then hide away. I have a process for watching a file on my system and sending the contents to BulletinBoard when changed. It works great with my workflows. There is also an [Alfred workflow](https://github.com/raguay/MyAlfred/blob/master/Alfred%205/EmailIt.alfredworkflow) for sending information to the program. The workflow also integrates with [EmailIt](https://github.com/raguay/EmailIt).
From fcaff5e09d9185aba611265724edfa0585b470c7 Mon Sep 17 00:00:00 2001
From: aMMu
Date: Tue, 2 Sep 2025 15:03:21 +0500
Subject: [PATCH 04/99] Add
wails-react-vite-ts-tailwind-tanstackrouter-template (#4549)
Co-authored-by: Lea Anthony
---
website/versioned_docs/version-v2.10/community/templates.mdx | 1 +
1 file changed, 1 insertion(+)
diff --git a/website/versioned_docs/version-v2.10/community/templates.mdx b/website/versioned_docs/version-v2.10/community/templates.mdx
index 2f05db5b2..9eac30478 100644
--- a/website/versioned_docs/version-v2.10/community/templates.mdx
+++ b/website/versioned_docs/version-v2.10/community/templates.mdx
@@ -43,6 +43,7 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - A template for React + TypeScript + Vite + TailwindCSS
- [wails-vite-react-ts-tailwind-shadcnui-template](https://github.com/Mahcks/wails-vite-react-tailwind-shadcnui-ts) - A template with Vite, React, TypeScript, TailwindCSS, and shadcn/ui
- [wails-nextjs-tailwind-template](https://github.com/kairo913/wails-nextjs-tailwind-template) - A template using Next.js and Typescript with TailwindCSS
+- [wails-react-vite-ts-tailwind-tanstackrouter-template](https://github.com/poisonshell/wails-vite-react-ts) - A template with Vite, React, TypeScript, TailwindCSS, and Tanstack Router
## Svelte
From 1589a2f83546d1d048b72c9f44384538b20f303c Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Tue, 2 Sep 2025 20:03:52 +1000
Subject: [PATCH 05/99] chore: update sponsors.svg (#4533)
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
---
website/static/img/sponsors.svg | 62 ++++++++++++++++++++-------------
1 file changed, 38 insertions(+), 24 deletions(-)
diff --git a/website/static/img/sponsors.svg b/website/static/img/sponsors.svg
index 3fe94dd68..49933a096 100644
--- a/website/static/img/sponsors.svg
+++ b/website/static/img/sponsors.svg
@@ -134,10 +134,10 @@ text {
-
-
+
-
+
+
+
From bc3299fff64721ae3a03bd28923d6e3d3bea5998 Mon Sep 17 00:00:00 2001
From: Copilot <198982749+Copilot@users.noreply.github.com>
Date: Tue, 2 Sep 2025 20:36:19 +1000
Subject: [PATCH 06/99] Fix authentication issues in nightly-release-v3.yml
workflow (#4552)
* Initial plan
* Fix authentication issues in nightly-release-v3.yml workflow
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
---
.github/workflows/nightly-release-v3.yml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/nightly-release-v3.yml b/.github/workflows/nightly-release-v3.yml
index 2a7530917..54649f518 100644
--- a/.github/workflows/nightly-release-v3.yml
+++ b/.github/workflows/nightly-release-v3.yml
@@ -32,7 +32,7 @@ jobs:
with:
ref: v3-alpha
fetch-depth: 0
- token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+ token: ${{ github.token }}
- name: Setup Go
uses: actions/setup-go@v5
@@ -44,7 +44,7 @@ jobs:
uses: arduino/setup-task@v2
with:
version: 3.x
- repo-token: ${{ secrets.GITHUB_TOKEN }}
+ repo-token: ${{ github.token }}
- name: Verify Go and Task installation
run: |
@@ -66,7 +66,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Configure git to use the token for authentication
- git config --global url."https://x-access-token:${{ secrets.WAILS_REPO_TOKEN || github.token }}@github.com/".insteadOf "https://github.com/"
+ git config --global url."https://x-access-token:${{ github.token }}@github.com/".insteadOf "https://github.com/"
- name: Check for existing release tag
id: check_tag
@@ -329,7 +329,7 @@ jobs:
steps.release.outputs.success == 'true' &&
steps.release.outputs.version_changed == 'true'
env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+ GITHUB_TOKEN: ${{ github.token }}
run: |
echo "🏷️ Creating and pushing git tag: ${{ steps.release.outputs.tag }}"
@@ -395,7 +395,7 @@ jobs:
steps.release.outputs.success == 'true' &&
steps.release.outputs.version_changed == 'true'
env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+ GITHUB_TOKEN: ${{ github.token }}
run: |
echo "📝 Committing and pushing changes..."
@@ -572,7 +572,7 @@ jobs:
echo "outcome=failure" >> $GITHUB_OUTPUT
fi
env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+ GITHUB_TOKEN: ${{ github.token }}
- name: Handle GitHub Release Creation Result
id: release_result
From 140a110e6d579ccfd2d0a4acfb13e1ecb003ee27 Mon Sep 17 00:00:00 2001
From: Copilot <198982749+Copilot@users.noreply.github.com>
Date: Tue, 2 Sep 2025 21:05:04 +1000
Subject: [PATCH 07/99] Fix workflow permissions: add actions:write to
unreleased-changelog-trigger.yml (#4553)
* Initial plan
* Fix workflow permissions: add actions:write to unreleased-changelog-trigger.yml
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
---
.../unreleased-changelog-trigger.yml | 129 ++++++++++++++++++
1 file changed, 129 insertions(+)
create mode 100644 .github/workflows/unreleased-changelog-trigger.yml
diff --git a/.github/workflows/unreleased-changelog-trigger.yml b/.github/workflows/unreleased-changelog-trigger.yml
new file mode 100644
index 000000000..8cfe85de0
--- /dev/null
+++ b/.github/workflows/unreleased-changelog-trigger.yml
@@ -0,0 +1,129 @@
+name: Auto Release on Changelog Update
+
+on:
+ push:
+ branches:
+ - v3-alpha
+ paths:
+ - 'v3/UNRELEASED_CHANGELOG.md'
+ workflow_dispatch:
+ inputs:
+ dry_run:
+ description: 'Run in dry-run mode (no actual release)'
+ required: false
+ default: false
+ type: boolean
+
+jobs:
+ check-permissions:
+ name: Check Release Permissions
+ runs-on: ubuntu-latest
+ outputs:
+ authorized: ${{ steps.check.outputs.authorized }}
+ steps:
+ - name: Check if user is authorized for releases
+ id: check
+ run: |
+ # Only allow specific users to trigger releases
+ AUTHORIZED_USERS="leaanthony"
+
+ if [[ "$AUTHORIZED_USERS" == *"${{ github.actor }}"* ]]; then
+ echo "✅ User ${{ github.actor }} is authorized for releases"
+ echo "authorized=true" >> $GITHUB_OUTPUT
+ else
+ echo "❌ User ${{ github.actor }} is not authorized for releases"
+ echo "authorized=false" >> $GITHUB_OUTPUT
+ fi
+
+ trigger-release:
+ name: Trigger v3-alpha Release
+ permissions:
+ contents: read
+ actions: write
+ runs-on: ubuntu-latest
+ needs: check-permissions
+ if: needs.check-permissions.outputs.authorized == 'true'
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ ref: v3-alpha
+ fetch-depth: 0
+ token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+
+ - name: Check for unreleased changelog content
+ id: changelog_check
+ run: |
+ echo "🔍 Checking UNRELEASED_CHANGELOG.md for content..."
+
+ cd v3
+ # Check if UNRELEASED_CHANGELOG.md has actual content beyond the template
+ if [ -f "UNRELEASED_CHANGELOG.md" ]; then
+ # Use a simple check for actual content (bullet points starting with -)
+ CONTENT_LINES=$(grep -E "^\s*-\s+[^[:space:]]" UNRELEASED_CHANGELOG.md | wc -l)
+ if [ "$CONTENT_LINES" -gt 0 ]; then
+ echo "✅ Found $CONTENT_LINES content lines in UNRELEASED_CHANGELOG.md"
+ echo "has_content=true" >> $GITHUB_OUTPUT
+ else
+ echo "ℹ️ No actual content found in UNRELEASED_CHANGELOG.md"
+ echo "has_content=false" >> $GITHUB_OUTPUT
+ fi
+ else
+ echo "❌ UNRELEASED_CHANGELOG.md not found"
+ echo "has_content=false" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Trigger nightly release workflow
+ if: steps.changelog_check.outputs.has_content == 'true'
+ uses: actions/github-script@v7
+ with:
+ github-token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+ script: |
+ const response = await github.rest.actions.createWorkflowDispatch({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ workflow_id: 'nightly-release-v3.yml',
+ ref: 'v3-alpha',
+ inputs: {
+ force_release: 'true',
+ dry_run: '${{ github.event.inputs.dry_run || "false" }}'
+ }
+ });
+
+ console.log('🚀 Successfully triggered nightly release workflow');
+ console.log(`Workflow dispatch response status: ${response.status}`);
+
+ // Create a summary
+ core.summary
+ .addHeading('🚀 Auto Release Triggered')
+ .addRaw('The v3-alpha release workflow has been automatically triggered due to changes in UNRELEASED_CHANGELOG.md')
+ .addTable([
+ [{data: 'Trigger', header: true}, {data: 'Value', header: true}],
+ ['Repository', context.repo.repo],
+ ['Branch', 'v3-alpha'],
+ ['Actor', context.actor],
+ ['Dry Run', '${{ github.event.inputs.dry_run || "false" }}'],
+ ['Force Release', 'true']
+ ])
+ .addRaw('\n---\n*This release was automatically triggered by the unreleased-changelog-trigger workflow*')
+ .write();
+
+ - name: No content found
+ if: steps.changelog_check.outputs.has_content == 'false'
+ run: |
+ echo "ℹ️ No content found in UNRELEASED_CHANGELOG.md, skipping release trigger"
+ echo "## ℹ️ No Release Triggered" >> $GITHUB_STEP_SUMMARY
+ echo "**Reason:** UNRELEASED_CHANGELOG.md does not contain actual changelog content" >> $GITHUB_STEP_SUMMARY
+ echo "**Action:** No release workflow was triggered" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "To trigger a release, add actual changelog entries to the UNRELEASED_CHANGELOG.md file." >> $GITHUB_STEP_SUMMARY
+
+ - name: Unauthorized user
+ if: needs.check-permissions.outputs.authorized == 'false'
+ run: |
+ echo "❌ User ${{ github.actor }} is not authorized to trigger releases"
+ echo "## ❌ Unauthorized Release Attempt" >> $GITHUB_STEP_SUMMARY
+ echo "**User:** ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY
+ echo "**Action:** Release trigger was blocked due to insufficient permissions" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "Only authorized users can trigger automatic releases via changelog updates." >> $GITHUB_STEP_SUMMARY
\ No newline at end of file
From 45167ff74393f25f20b8f142cfd46b516543c19b Mon Sep 17 00:00:00 2001
From: Lea Anthony
Date: Wed, 10 Sep 2025 06:53:18 +1000
Subject: [PATCH 08/99] chore: fix release pipeline
---
.github/workflows/nightly-release-v3.yml | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/nightly-release-v3.yml b/.github/workflows/nightly-release-v3.yml
index 54649f518..30e4fba6b 100644
--- a/.github/workflows/nightly-release-v3.yml
+++ b/.github/workflows/nightly-release-v3.yml
@@ -681,7 +681,8 @@ jobs:
- name: Summary
if: always()
run: |
- if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
+ DRY_RUN_INPUT="${{ github.event.inputs.dry_run }}"; [ -z "$DRY_RUN_INPUT" ] && DRY_RUN_INPUT=false
+ if [ "$DRY_RUN_INPUT" == "true" ]; then
echo "## 🧪 DRY RUN Release Test Summary" >> $GITHUB_STEP_SUMMARY
else
echo "## 🚀 Nightly Release Summary" >> $GITHUB_STEP_SUMMARY
@@ -699,7 +700,7 @@ jobs:
# Overall status
if [ "${{ steps.error_summary.outputs.overall_success }}" == "true" ]; then
- if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
+ if [ "$DRY_RUN_INPUT" == "true" ]; then
echo "- **Mode:** 🧪 DRY RUN (no actual release created)" >> $GITHUB_STEP_SUMMARY
echo "- **Status:** ✅ Test completed successfully" >> $GITHUB_STEP_SUMMARY
else
@@ -730,10 +731,12 @@ jobs:
fi
# Error reporting section
- if [ "${{ steps.error_summary.outputs.total_errors }}" -gt 0 ]; then
+ ERRORS_TOTAL="${{ steps.error_summary.outputs.total_errors }}"
+ ERRORS_TOTAL=${ERRORS_TOTAL:-0}
+ if [ "$ERRORS_TOTAL" -gt 0 ]; then
echo "" >> $GITHUB_STEP_SUMMARY
echo "## ⚠️ Error Report" >> $GITHUB_STEP_SUMMARY
- echo "**Total Error Categories:** ${{ steps.error_summary.outputs.total_errors }}" >> $GITHUB_STEP_SUMMARY
+ echo "**Total Error Categories:** $ERRORS_TOTAL" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "${{ steps.error_summary.outputs.error_summary }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
@@ -760,4 +763,4 @@ jobs:
if [ "${{ steps.error_summary.outputs.overall_success }}" != "true" ]; then
echo "⚠️ Workflow completed with errors. Check the summary above for details."
exit 1
- fi
\ No newline at end of file
+ fi
From a35b676e057dbc358d6dfeefcdfb224c417b0a16 Mon Sep 17 00:00:00 2001
From: Lea Anthony
Date: Wed, 10 Sep 2025 07:29:21 +1000
Subject: [PATCH 09/99] chore: fix release pipeline
---
.github/workflows/nightly-release-v3.yml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/nightly-release-v3.yml b/.github/workflows/nightly-release-v3.yml
index 30e4fba6b..2ca6b4811 100644
--- a/.github/workflows/nightly-release-v3.yml
+++ b/.github/workflows/nightly-release-v3.yml
@@ -32,7 +32,7 @@ jobs:
with:
ref: v3-alpha
fetch-depth: 0
- token: ${{ github.token }}
+ token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
- name: Setup Go
uses: actions/setup-go@v5
@@ -44,7 +44,7 @@ jobs:
uses: arduino/setup-task@v2
with:
version: 3.x
- repo-token: ${{ github.token }}
+ repo-token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
- name: Verify Go and Task installation
run: |
@@ -66,7 +66,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Configure git to use the token for authentication
- git config --global url."https://x-access-token:${{ github.token }}@github.com/".insteadOf "https://github.com/"
+ git config --global url."https://x-access-token:${{ secrets.WAILS_REPO_TOKEN || github.token }}@github.com/".insteadOf "https://github.com/"
- name: Check for existing release tag
id: check_tag
@@ -329,7 +329,7 @@ jobs:
steps.release.outputs.success == 'true' &&
steps.release.outputs.version_changed == 'true'
env:
- GITHUB_TOKEN: ${{ github.token }}
+ GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
run: |
echo "🏷️ Creating and pushing git tag: ${{ steps.release.outputs.tag }}"
@@ -395,7 +395,7 @@ jobs:
steps.release.outputs.success == 'true' &&
steps.release.outputs.version_changed == 'true'
env:
- GITHUB_TOKEN: ${{ github.token }}
+ GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
run: |
echo "📝 Committing and pushing changes..."
@@ -572,7 +572,7 @@ jobs:
echo "outcome=failure" >> $GITHUB_OUTPUT
fi
env:
- GITHUB_TOKEN: ${{ github.token }}
+ GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
- name: Handle GitHub Release Creation Result
id: release_result
From 2b8276da4212b13401b34c32461eb21bf07a7768 Mon Sep 17 00:00:00 2001
From: Lea Anthony
Date: Wed, 10 Sep 2025 07:35:24 +1000
Subject: [PATCH 10/99] revert to older nightly release pipeline
---
.github/workflows/nightly-release-v3.yml | 1415 +++++++++++-----------
1 file changed, 706 insertions(+), 709 deletions(-)
diff --git a/.github/workflows/nightly-release-v3.yml b/.github/workflows/nightly-release-v3.yml
index 2ca6b4811..5f5c06ee8 100644
--- a/.github/workflows/nightly-release-v3.yml
+++ b/.github/workflows/nightly-release-v3.yml
@@ -27,740 +27,737 @@ jobs:
actions: write
steps:
- - name: Checkout code
- uses: actions/checkout@v4
- with:
- ref: v3-alpha
- fetch-depth: 0
- token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
-
- - name: Setup Go
- uses: actions/setup-go@v5
- with:
- go-version: '1.23'
- cache-dependency-path: 'v3/go.sum'
-
- - name: Install Task
- uses: arduino/setup-task@v2
- with:
- version: 3.x
- repo-token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
-
- - name: Verify Go and Task installation
- run: |
- echo "Go version:"
- go version
- echo ""
- echo "Task version:"
- task --version
- echo ""
- echo "Working directory:"
- pwd
- echo ""
- echo "v3 directory contents:"
- ls -la v3/
-
- - name: Setup Git
- run: |
- git config --global user.name "github-actions[bot]"
- git config --global user.email "github-actions[bot]@users.noreply.github.com"
-
- # Configure git to use the token for authentication
- git config --global url."https://x-access-token:${{ secrets.WAILS_REPO_TOKEN || github.token }}@github.com/".insteadOf "https://github.com/"
-
- - name: Check for existing release tag
- id: check_tag
- run: |
- if git describe --tags --exact-match HEAD 2>/dev/null; then
- echo "has_tag=true" >> $GITHUB_OUTPUT
- echo "tag=$(git describe --tags --exact-match HEAD)" >> $GITHUB_OUTPUT
- else
- echo "has_tag=false" >> $GITHUB_OUTPUT
- echo "tag=" >> $GITHUB_OUTPUT
- fi
-
- - name: Check for unreleased changelog content
- id: changelog_check
- run: |
- echo "🔍 Checking UNRELEASED_CHANGELOG.md for content..."
-
- # Check if the file exists and has content
- if [ -f "v3/UNRELEASED_CHANGELOG.md" ]; then
- echo "Found v3/UNRELEASED_CHANGELOG.md"
-
- # Run the release script in check mode to see if there's content
- cd v3/tasks/release
-
- # Use the release script itself to check for content
- if go run release.go --check-only 2>/dev/null; then
- echo "has_unreleased_content=true" >> $GITHUB_OUTPUT
- echo "✅ Found unreleased changelog content"
- else
- echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
- echo "ℹ️ No unreleased changelog content found"
- fi
- else
- echo "⚠️ v3/UNRELEASED_CHANGELOG.md not found"
- echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
- fi
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ ref: v3-alpha
+ fetch-depth: 0
+ token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
- - name: Quick change detection and early exit
- id: quick_check
- run: |
- echo "🔍 Quick check for changes to determine if we should continue..."
-
- # First check if we have unreleased changelog content
- if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
- echo "✅ Found unreleased changelog content, proceeding with release"
- echo "has_changes=true" >> $GITHUB_OUTPUT
- echo "should_continue=true" >> $GITHUB_OUTPUT
- echo "reason=Found unreleased changelog content" >> $GITHUB_OUTPUT
- exit 0
- fi
-
- # If no unreleased changelog content, check for git changes as fallback
- echo "No unreleased changelog content found, checking for git changes..."
-
- # Check if current commit has a release tag
- if git describe --tags --exact-match HEAD 2>/dev/null; then
- CURRENT_TAG=$(git describe --tags --exact-match HEAD)
- echo "Current commit has release tag: $CURRENT_TAG"
+ - name: Setup Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: '1.23'
+ cache-dependency-path: 'v3/go.sum'
+
+ - name: Install Task
+ uses: arduino/setup-task@v2
+ with:
+ version: 3.x
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Verify Go and Task installation
+ run: |
+ echo "Go version:"
+ go version
+ echo ""
+ echo "Task version:"
+ task --version
+ echo ""
+ echo "Working directory:"
+ pwd
+ echo ""
+ echo "v3 directory contents:"
+ ls -la v3/
+
+ - name: Setup Git
+ run: |
+ git config --global user.name "github-actions[bot]"
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
- # For tagged commits, check if there are changes since the tag
- COMMIT_COUNT=$(git rev-list ${CURRENT_TAG}..HEAD --count)
- if [ "$COMMIT_COUNT" -eq 0 ]; then
- echo "has_changes=false" >> $GITHUB_OUTPUT
- echo "should_continue=false" >> $GITHUB_OUTPUT
- echo "reason=No changes since existing tag $CURRENT_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
+ # Configure git to use the token for authentication
+ git config --global url."https://x-access-token:${{ secrets.WAILS_REPO_TOKEN || github.token }}@github.com/".insteadOf "https://github.com/"
+
+ - name: Check for existing release tag
+ id: check_tag
+ run: |
+ if git describe --tags --exact-match HEAD 2>/dev/null; then
+ echo "has_tag=true" >> $GITHUB_OUTPUT
+ echo "tag=$(git describe --tags --exact-match HEAD)" >> $GITHUB_OUTPUT
else
- echo "has_changes=true" >> $GITHUB_OUTPUT
- echo "should_continue=true" >> $GITHUB_OUTPUT
+ echo "has_tag=false" >> $GITHUB_OUTPUT
+ echo "tag=" >> $GITHUB_OUTPUT
fi
- else
- # No current tag, check against latest release
- LATEST_TAG=$(git tag --list "v3.0.0-alpha.*" | sort -V | tail -1)
- if [ -z "$LATEST_TAG" ]; then
- echo "No previous release found, proceeding with release"
+
+ - name: Check for unreleased changelog content
+ id: changelog_check
+ run: |
+ echo "🔍 Checking UNRELEASED_CHANGELOG.md for content..."
+
+ # Check if the file exists and has content
+ if [ -f "v3/UNRELEASED_CHANGELOG.md" ]; then
+ echo "Found v3/UNRELEASED_CHANGELOG.md"
+
+ # Run the release script in check mode to see if there's content
+ cd v3/tasks/release
+
+ # Use the release script itself to check for content
+ if go run release.go --check-only 2>/dev/null; then
+ echo "has_unreleased_content=true" >> $GITHUB_OUTPUT
+ echo "✅ Found unreleased changelog content"
+ else
+ echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
+ echo "ℹ️ No unreleased changelog content found"
+ fi
+ else
+ echo "⚠️ v3/UNRELEASED_CHANGELOG.md not found"
+ echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Quick change detection and early exit
+ id: quick_check
+ run: |
+ echo "🔍 Quick check for changes to determine if we should continue..."
+
+ # First check if we have unreleased changelog content
+ if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
+ echo "✅ Found unreleased changelog content, proceeding with release"
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "should_continue=true" >> $GITHUB_OUTPUT
+ echo "reason=Found unreleased changelog content" >> $GITHUB_OUTPUT
+ exit 0
+ fi
+
+ # If no unreleased changelog content, check for git changes as fallback
+ echo "No unreleased changelog content found, checking for git changes..."
+
+ # Check if current commit has a release tag
+ if git describe --tags --exact-match HEAD 2>/dev/null; then
+ CURRENT_TAG=$(git describe --tags --exact-match HEAD)
+ echo "Current commit has release tag: $CURRENT_TAG"
+
+ # For tagged commits, check if there are changes since the tag
+ COMMIT_COUNT=$(git rev-list ${CURRENT_TAG}..HEAD --count)
+ if [ "$COMMIT_COUNT" -eq 0 ]; then
+ echo "has_changes=false" >> $GITHUB_OUTPUT
+ echo "should_continue=false" >> $GITHUB_OUTPUT
+ echo "reason=No changes since existing tag $CURRENT_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
+ else
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "should_continue=true" >> $GITHUB_OUTPUT
+ fi
else
- COMMIT_COUNT=$(git rev-list ${LATEST_TAG}..HEAD --count)
- if [ "$COMMIT_COUNT" -gt 0 ]; then
- echo "Found $COMMIT_COUNT commits since $LATEST_TAG"
+ # No current tag, check against latest release
+ LATEST_TAG=$(git tag --list "v3.0.0-alpha.*" | sort -V | tail -1)
+ if [ -z "$LATEST_TAG" ]; then
+ echo "No previous release found, proceeding with release"
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "should_continue=true" >> $GITHUB_OUTPUT
else
- echo "has_changes=false" >> $GITHUB_OUTPUT
- echo "should_continue=false" >> $GITHUB_OUTPUT
- echo "reason=No changes since latest release $LATEST_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
- fi
- fi
- fi
-
- - name: Early exit - No changes detected
- if: |
- steps.quick_check.outputs.should_continue == 'false' &&
- github.event.inputs.force_release != 'true'
- run: |
- echo "🛑 EARLY EXIT: ${{ steps.quick_check.outputs.reason }}"
- echo ""
- echo "ℹ️ No changes detected since last release and force_release is not enabled."
- echo " Workflow will exit early to save resources."
- echo ""
- echo " To force a release anyway, run this workflow with 'force_release=true'"
- echo ""
- echo "## 🛑 Early Exit Summary" >> $GITHUB_STEP_SUMMARY
- echo "**Reason:** ${{ steps.quick_check.outputs.reason }}" >> $GITHUB_STEP_SUMMARY
- echo "**Action:** Workflow exited early to save resources" >> $GITHUB_STEP_SUMMARY
- echo "**Force Release:** Set 'force_release=true' to override this behavior" >> $GITHUB_STEP_SUMMARY
- exit 0
-
- - name: Continue with release process
- if: |
- steps.quick_check.outputs.should_continue == 'true' ||
- github.event.inputs.force_release == 'true'
- run: |
- echo "✅ Proceeding with release process..."
- if [ "${{ github.event.inputs.force_release }}" == "true" ]; then
- echo "🔨 FORCE RELEASE: Overriding change detection"
- fi
-
- - name: Extract changelog content before release
- id: extract_changelog
- if: |
- steps.quick_check.outputs.should_continue == 'true' ||
- github.event.inputs.force_release == 'true'
- run: |
- cd v3
-
- echo "📝 Extracting changelog content before release..."
-
- # Use the new --create-release-notes flag
- cd tasks/release
- if go run release.go --create-release-notes ../../release_notes.md; then
- echo "✅ Successfully created release notes"
- echo "has_content=true" >> $GITHUB_OUTPUT
-
- # Show content preview
- echo "Release notes preview:"
- head -10 ../../release_notes.md
- else
- echo "⚠️ Failed to create release notes or no content found"
- echo "No changelog updates in this release." > ../../release_notes.md
- echo "has_content=false" >> $GITHUB_OUTPUT
- fi
- cd ../..
-
- - name: Run release script
- id: release
- if: |
- steps.quick_check.outputs.should_continue == 'true' ||
- github.event.inputs.force_release == 'true'
- run: |
- cd v3
-
- echo "🚀 Running release task..."
- echo "======================================================="
-
- # Initialize error tracking
- RELEASE_ERRORS=""
- RELEASE_SUCCESS=true
-
- # Store the original version for comparison
- ORIGINAL_VERSION=$(cat internal/version/version.txt 2>/dev/null || echo "unknown")
- echo "📌 Current version: $ORIGINAL_VERSION"
-
- # Run the release task and capture output with error handling
- if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
- echo "🧪 DRY RUN MODE: Simulating release task execution"
- # In dry run, we'll simulate the task without making actual changes
- OUTPUT=$(task release 2>&1 || true)
- RELEASE_EXIT_CODE=0 # Always succeed in dry run
- echo "$OUTPUT"
- else
- echo "🚀 LIVE MODE: Executing release task"
- OUTPUT=$(task release 2>&1)
- RELEASE_EXIT_CODE=$?
- echo "$OUTPUT"
-
- if [ $RELEASE_EXIT_CODE -ne 0 ]; then
- echo "❌ Release task failed with exit code $RELEASE_EXIT_CODE"
- RELEASE_ERRORS="$RELEASE_ERRORS\n- Release task execution failed: $OUTPUT"
- RELEASE_SUCCESS=false
- else
- echo "✅ Release task completed successfully"
- fi
- fi
-
- # Verify version file exists and is readable
- if [ ! -f "internal/version/version.txt" ]; then
- echo "❌ Version file not found: internal/version/version.txt"
- RELEASE_ERRORS="$RELEASE_ERRORS\n- Version file not found after release task execution"
- RELEASE_SUCCESS=false
- RELEASE_VERSION="unknown"
- else
- RELEASE_VERSION=$(cat internal/version/version.txt 2>/dev/null || echo "unknown")
- if [ "$RELEASE_VERSION" == "unknown" ]; then
- echo "❌ Failed to read version from file"
- RELEASE_ERRORS="$RELEASE_ERRORS\n- Failed to read version from version.txt"
- RELEASE_SUCCESS=false
- else
- echo "✅ Successfully read version: $RELEASE_VERSION"
- fi
- fi
-
- # Check if version changed
- VERSION_CHANGED="false"
- if [ "$ORIGINAL_VERSION" != "$RELEASE_VERSION" ] && [ "$RELEASE_VERSION" != "unknown" ]; then
- echo "✅ Version changed from $ORIGINAL_VERSION to $RELEASE_VERSION"
- VERSION_CHANGED="true"
- else
- echo "ℹ️ Version unchanged: $RELEASE_VERSION"
- fi
-
- RELEASE_TAG="${RELEASE_VERSION}"
- RELEASE_TITLE="Wails ${RELEASE_VERSION}"
-
- # Set outputs for next steps
- echo "version=$RELEASE_VERSION" >> $GITHUB_OUTPUT
- echo "tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
- echo "title=$RELEASE_TITLE" >> $GITHUB_OUTPUT
- echo "is_prerelease=true" >> $GITHUB_OUTPUT
- echo "is_latest=false" >> $GITHUB_OUTPUT
- echo "has_changes=${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_OUTPUT
- echo "success=$RELEASE_SUCCESS" >> $GITHUB_OUTPUT
- echo "version_changed=$VERSION_CHANGED" >> $GITHUB_OUTPUT
-
- # Copy pre-extracted release notes
- if [ "$RELEASE_SUCCESS" == "true" ]; then
- echo "📝 Using pre-extracted release notes..."
-
- # Use the release_notes.md file created earlier
- if [ -f "release_notes.md" ]; then
- cp release_notes.md release-notes.txt
- echo "✅ Successfully copied release notes"
- echo "release_notes_file=release-notes.txt" >> $GITHUB_OUTPUT
- else
- echo "ℹ️ No pre-extracted release notes found"
- echo "No detailed changelog available for this release." > release-notes.txt
- echo "release_notes_file=release-notes.txt" >> $GITHUB_OUTPUT
- fi
- else
- echo "release_notes_file=" >> $GITHUB_OUTPUT
- echo "⚠️ Skipping release notes generation due to release task failure"
- fi
-
- # Set error output for later steps
- if [ -n "$RELEASE_ERRORS" ]; then
- echo "release_errors<> $GITHUB_OUTPUT
- echo -e "$RELEASE_ERRORS" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- echo "has_release_errors=true" >> $GITHUB_OUTPUT
- else
- echo "has_release_errors=false" >> $GITHUB_OUTPUT
- fi
-
- - name: Create and push git tag
- id: git_tag
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- steps.check_tag.outputs.has_tag == 'false' &&
- github.event.inputs.dry_run != 'true' &&
- steps.release.outputs.success == 'true' &&
- steps.release.outputs.version_changed == 'true'
- env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
- run: |
- echo "🏷️ Creating and pushing git tag: ${{ steps.release.outputs.tag }}"
-
- # Initialize error tracking
- GIT_ERRORS=""
- GIT_SUCCESS=true
-
- # Create git tag with error handling
- if git tag -a "${{ steps.release.outputs.tag }}" -m "Release ${{ steps.release.outputs.version }}" 2>&1; then
- echo "✅ Successfully created git tag: ${{ steps.release.outputs.tag }}"
- else
- echo "❌ Failed to create git tag"
- GIT_ERRORS="$GIT_ERRORS\n- Failed to create git tag: ${{ steps.release.outputs.tag }}"
- GIT_SUCCESS=false
- fi
-
- # Push tag with retry logic and error handling
- if [ "$GIT_SUCCESS" == "true" ]; then
- RETRY_COUNT=0
- MAX_RETRIES=3
- PUSH_SUCCESS=false
-
- while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$PUSH_SUCCESS" == "false" ]; do
- RETRY_COUNT=$((RETRY_COUNT + 1))
- echo "🔄 Attempting to push tag (attempt $RETRY_COUNT/$MAX_RETRIES)..."
-
- if git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" "${{ steps.release.outputs.tag }}" 2>&1; then
- echo "✅ Successfully pushed git tag to origin"
- PUSH_SUCCESS=true
- else
- echo "❌ Failed to push git tag (attempt $RETRY_COUNT/$MAX_RETRIES)"
- if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
- echo "⏳ Waiting 5 seconds before retry..."
- sleep 5
+ COMMIT_COUNT=$(git rev-list ${LATEST_TAG}..HEAD --count)
+ if [ "$COMMIT_COUNT" -gt 0 ]; then
+ echo "Found $COMMIT_COUNT commits since $LATEST_TAG"
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "should_continue=true" >> $GITHUB_OUTPUT
+ else
+ echo "has_changes=false" >> $GITHUB_OUTPUT
+ echo "should_continue=false" >> $GITHUB_OUTPUT
+ echo "reason=No changes since latest release $LATEST_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
fi
fi
- done
+ fi
+
+ - name: Early exit - No changes detected
+ if: |
+ steps.quick_check.outputs.should_continue == 'false' &&
+ github.event.inputs.force_release != 'true'
+ run: |
+ echo "🛑 EARLY EXIT: ${{ steps.quick_check.outputs.reason }}"
+ echo ""
+ echo "ℹ️ No changes detected since last release and force_release is not enabled."
+ echo " Workflow will exit early to save resources."
+ echo ""
+ echo " To force a release anyway, run this workflow with 'force_release=true'"
+ echo ""
+ echo "## 🛑 Early Exit Summary" >> $GITHUB_STEP_SUMMARY
+ echo "**Reason:** ${{ steps.quick_check.outputs.reason }}" >> $GITHUB_STEP_SUMMARY
+ echo "**Action:** Workflow exited early to save resources" >> $GITHUB_STEP_SUMMARY
+ echo "**Force Release:** Set 'force_release=true' to override this behavior" >> $GITHUB_STEP_SUMMARY
+ exit 0
+
+ - name: Continue with release process
+ if: |
+ steps.quick_check.outputs.should_continue == 'true' ||
+ github.event.inputs.force_release == 'true'
+ run: |
+ echo "✅ Proceeding with release process..."
+ if [ "${{ github.event.inputs.force_release }}" == "true" ]; then
+ echo "🔨 FORCE RELEASE: Overriding change detection"
+ fi
+
+ - name: Extract changelog content before release
+ id: extract_changelog
+ if: |
+ steps.quick_check.outputs.should_continue == 'true' ||
+ github.event.inputs.force_release == 'true'
+ run: |
+ cd v3
- if [ "$PUSH_SUCCESS" == "false" ]; then
- echo "❌ Failed to push git tag after $MAX_RETRIES attempts"
- GIT_ERRORS="$GIT_ERRORS\n- Failed to push git tag after $MAX_RETRIES attempts"
+ echo "📝 Extracting changelog content before release..."
+
+ # Use the new --create-release-notes flag
+ cd tasks/release
+ if go run release.go --create-release-notes ../../release_notes.md; then
+ echo "✅ Successfully created release notes"
+ echo "has_content=true" >> $GITHUB_OUTPUT
+
+ # Show content preview
+ echo "Release notes preview:"
+ head -10 ../../release_notes.md
+ else
+ echo "⚠️ Failed to create release notes or no content found"
+ echo "No changelog updates in this release." > ../../release_notes.md
+ echo "has_content=false" >> $GITHUB_OUTPUT
+ fi
+ cd ../..
+
+ - name: Run release script
+ id: release
+ if: |
+ steps.quick_check.outputs.should_continue == 'true' ||
+ github.event.inputs.force_release == 'true'
+ run: |
+ cd v3
+
+ echo "🚀 Running release task..."
+ echo "======================================================="
+
+ # Initialize error tracking
+ RELEASE_ERRORS=""
+ RELEASE_SUCCESS=true
+
+ # Store the original version for comparison
+ ORIGINAL_VERSION=$(cat internal/version/version.txt 2>/dev/null || echo "unknown")
+ echo "📌 Current version: $ORIGINAL_VERSION"
+
+ # Run the release task and capture output with error handling
+ if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
+ echo "🧪 DRY RUN MODE: Simulating release task execution"
+ # In dry run, we'll simulate the task without making actual changes
+ OUTPUT=$(task release 2>&1 || true)
+ RELEASE_EXIT_CODE=0 # Always succeed in dry run
+ echo "$OUTPUT"
+ else
+ echo "🚀 LIVE MODE: Executing release task"
+ OUTPUT=$(task release 2>&1)
+ RELEASE_EXIT_CODE=$?
+ echo "$OUTPUT"
+
+ if [ $RELEASE_EXIT_CODE -ne 0 ]; then
+ echo "❌ Release task failed with exit code $RELEASE_EXIT_CODE"
+ RELEASE_ERRORS="$RELEASE_ERRORS\n- Release task execution failed: $OUTPUT"
+ RELEASE_SUCCESS=false
+ else
+ echo "✅ Release task completed successfully"
+ fi
+ fi
+
+ # Verify version file exists and is readable
+ if [ ! -f "internal/version/version.txt" ]; then
+ echo "❌ Version file not found: internal/version/version.txt"
+ RELEASE_ERRORS="$RELEASE_ERRORS\n- Version file not found after release task execution"
+ RELEASE_SUCCESS=false
+ RELEASE_VERSION="unknown"
+ else
+ RELEASE_VERSION=$(cat internal/version/version.txt 2>/dev/null || echo "unknown")
+ if [ "$RELEASE_VERSION" == "unknown" ]; then
+ echo "❌ Failed to read version from file"
+ RELEASE_ERRORS="$RELEASE_ERRORS\n- Failed to read version from version.txt"
+ RELEASE_SUCCESS=false
+ else
+ echo "✅ Successfully read version: $RELEASE_VERSION"
+ fi
+ fi
+
+ # Check if version changed
+ VERSION_CHANGED="false"
+ if [ "$ORIGINAL_VERSION" != "$RELEASE_VERSION" ] && [ "$RELEASE_VERSION" != "unknown" ]; then
+ echo "✅ Version changed from $ORIGINAL_VERSION to $RELEASE_VERSION"
+ VERSION_CHANGED="true"
+ else
+ echo "ℹ️ Version unchanged: $RELEASE_VERSION"
+ fi
+
+ RELEASE_TAG="${RELEASE_VERSION}"
+ RELEASE_TITLE="Wails ${RELEASE_VERSION}"
+
+ # Set outputs for next steps
+ echo "version=$RELEASE_VERSION" >> $GITHUB_OUTPUT
+ echo "tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
+ echo "title=$RELEASE_TITLE" >> $GITHUB_OUTPUT
+ echo "is_prerelease=true" >> $GITHUB_OUTPUT
+ echo "is_latest=false" >> $GITHUB_OUTPUT
+ echo "has_changes=${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_OUTPUT
+ echo "success=$RELEASE_SUCCESS" >> $GITHUB_OUTPUT
+ echo "version_changed=$VERSION_CHANGED" >> $GITHUB_OUTPUT
+
+ # Copy pre-extracted release notes
+ if [ "$RELEASE_SUCCESS" == "true" ]; then
+ echo "📝 Using pre-extracted release notes..."
+
+ # Use the release_notes.md file created earlier
+ if [ -f "release_notes.md" ]; then
+ cp release_notes.md release-notes.txt
+ echo "✅ Successfully copied release notes"
+ echo "release_notes_file=release-notes.txt" >> $GITHUB_OUTPUT
+ else
+ echo "ℹ️ No pre-extracted release notes found"
+ echo "No detailed changelog available for this release." > release-notes.txt
+ echo "release_notes_file=release-notes.txt" >> $GITHUB_OUTPUT
+ fi
+ else
+ echo "release_notes_file=" >> $GITHUB_OUTPUT
+ echo "⚠️ Skipping release notes generation due to release task failure"
+ fi
+
+ # Set error output for later steps
+ if [ -n "$RELEASE_ERRORS" ]; then
+ echo "release_errors<> $GITHUB_OUTPUT
+ echo -e "$RELEASE_ERRORS" >> $GITHUB_OUTPUT
+ echo "EOF" >> $GITHUB_OUTPUT
+ echo "has_release_errors=true" >> $GITHUB_OUTPUT
+ else
+ echo "has_release_errors=false" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Create and push git tag
+ id: git_tag
+ if: |
+ (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
+ steps.check_tag.outputs.has_tag == 'false' &&
+ github.event.inputs.dry_run != 'true' &&
+ steps.release.outputs.success == 'true' &&
+ steps.release.outputs.version_changed == 'true'
+ env:
+ GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+ run: |
+ echo "🏷️ Creating and pushing git tag: ${{ steps.release.outputs.tag }}"
+
+ # Initialize error tracking
+ GIT_ERRORS=""
+ GIT_SUCCESS=true
+
+ # Create git tag with error handling
+ if git tag -a "${{ steps.release.outputs.tag }}" -m "Release ${{ steps.release.outputs.version }}" 2>&1; then
+ echo "✅ Successfully created git tag: ${{ steps.release.outputs.tag }}"
+ else
+ echo "❌ Failed to create git tag"
+ GIT_ERRORS="$GIT_ERRORS\n- Failed to create git tag: ${{ steps.release.outputs.tag }}"
GIT_SUCCESS=false
fi
- fi
-
- # Set outputs for later steps
- echo "success=$GIT_SUCCESS" >> $GITHUB_OUTPUT
-
- if [ -n "$GIT_ERRORS" ]; then
- echo "git_tag_errors<> $GITHUB_OUTPUT
- echo -e "$GIT_ERRORS" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- echo "has_git_errors=true" >> $GITHUB_OUTPUT
- else
- echo "has_git_errors=false" >> $GITHUB_OUTPUT
- fi
-
- - name: Commit and push changes
- id: git_commit
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- github.event.inputs.dry_run != 'true' &&
- steps.release.outputs.success == 'true' &&
- steps.release.outputs.version_changed == 'true'
- env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
- run: |
- echo "📝 Committing and pushing changes..."
-
- # Initialize error tracking
- COMMIT_ERRORS=""
- COMMIT_SUCCESS=true
-
- # Add any changes made by the release script with error handling
- if git add . 2>&1; then
- echo "✅ Successfully staged changes"
- else
- echo "❌ Failed to stage changes"
- COMMIT_ERRORS="$COMMIT_ERRORS\n- Failed to stage changes with git add"
- COMMIT_SUCCESS=false
- fi
-
- # Check if there are changes to commit
- if [ "$COMMIT_SUCCESS" == "true" ]; then
- if ! git diff --cached --quiet; then
- echo "📝 Changes detected, creating commit..."
-
- # Create commit with error handling
- if git commit -m "${{ steps.release.outputs.version }}" 2>&1; then
- echo "✅ Successfully created commit"
-
- # Push changes with retry logic
- RETRY_COUNT=0
- MAX_RETRIES=3
- PUSH_SUCCESS=false
-
- while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$PUSH_SUCCESS" == "false" ]; do
- RETRY_COUNT=$((RETRY_COUNT + 1))
- echo "🔄 Attempting to push changes (attempt $RETRY_COUNT/$MAX_RETRIES)..."
-
- if git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" v3-alpha 2>&1; then
- echo "✅ Successfully pushed changes to v3-alpha branch"
- PUSH_SUCCESS=true
- else
- echo "❌ Failed to push changes (attempt $RETRY_COUNT/$MAX_RETRIES)"
- if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
- echo "⏳ Waiting 5 seconds before retry..."
- sleep 5
- fi
+
+ # Push tag with retry logic and error handling
+ if [ "$GIT_SUCCESS" == "true" ]; then
+ RETRY_COUNT=0
+ MAX_RETRIES=3
+ PUSH_SUCCESS=false
+
+ while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$PUSH_SUCCESS" == "false" ]; do
+ RETRY_COUNT=$((RETRY_COUNT + 1))
+ echo "🔄 Attempting to push tag (attempt $RETRY_COUNT/$MAX_RETRIES)..."
+
+ if git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" "${{ steps.release.outputs.tag }}" 2>&1; then
+ echo "✅ Successfully pushed git tag to origin"
+ PUSH_SUCCESS=true
+ else
+ echo "❌ Failed to push git tag (attempt $RETRY_COUNT/$MAX_RETRIES)"
+ if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
+ echo "⏳ Waiting 5 seconds before retry..."
+ sleep 5
fi
- done
-
- if [ "$PUSH_SUCCESS" == "false" ]; then
- echo "❌ Failed to push changes after $MAX_RETRIES attempts"
- COMMIT_ERRORS="$COMMIT_ERRORS\n- Failed to push changes after $MAX_RETRIES attempts"
+ fi
+ done
+
+ if [ "$PUSH_SUCCESS" == "false" ]; then
+ echo "❌ Failed to push git tag after $MAX_RETRIES attempts"
+ GIT_ERRORS="$GIT_ERRORS\n- Failed to push git tag after $MAX_RETRIES attempts"
+ GIT_SUCCESS=false
+ fi
+ fi
+
+ # Set outputs for later steps
+ echo "success=$GIT_SUCCESS" >> $GITHUB_OUTPUT
+
+ if [ -n "$GIT_ERRORS" ]; then
+ echo "git_tag_errors<> $GITHUB_OUTPUT
+ echo -e "$GIT_ERRORS" >> $GITHUB_OUTPUT
+ echo "EOF" >> $GITHUB_OUTPUT
+ echo "has_git_errors=true" >> $GITHUB_OUTPUT
+ else
+ echo "has_git_errors=false" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Commit and push changes
+ id: git_commit
+ if: |
+ (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
+ github.event.inputs.dry_run != 'true' &&
+ steps.release.outputs.success == 'true' &&
+ steps.release.outputs.version_changed == 'true'
+ env:
+ GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+ run: |
+ echo "📝 Committing and pushing changes..."
+
+ # Initialize error tracking
+ COMMIT_ERRORS=""
+ COMMIT_SUCCESS=true
+
+ # Add any changes made by the release script with error handling
+ if git add . 2>&1; then
+ echo "✅ Successfully staged changes"
+ else
+ echo "❌ Failed to stage changes"
+ COMMIT_ERRORS="$COMMIT_ERRORS\n- Failed to stage changes with git add"
+ COMMIT_SUCCESS=false
+ fi
+
+ # Check if there are changes to commit
+ if [ "$COMMIT_SUCCESS" == "true" ]; then
+ if ! git diff --cached --quiet; then
+ echo "📝 Changes detected, creating commit..."
+
+ # Create commit with error handling
+ if git commit -m "${{ steps.release.outputs.version }}" 2>&1; then
+ echo "✅ Successfully created commit"
+
+ # Push changes with retry logic
+ RETRY_COUNT=0
+ MAX_RETRIES=3
+ PUSH_SUCCESS=false
+
+ while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$PUSH_SUCCESS" == "false" ]; do
+ RETRY_COUNT=$((RETRY_COUNT + 1))
+ echo "🔄 Attempting to push changes (attempt $RETRY_COUNT/$MAX_RETRIES)..."
+
+ if git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" v3-alpha 2>&1; then
+ echo "✅ Successfully pushed changes to v3-alpha branch"
+ PUSH_SUCCESS=true
+ else
+ echo "❌ Failed to push changes (attempt $RETRY_COUNT/$MAX_RETRIES)"
+ if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
+ echo "⏳ Waiting 5 seconds before retry..."
+ sleep 5
+ fi
+ fi
+ done
+
+ if [ "$PUSH_SUCCESS" == "false" ]; then
+ echo "❌ Failed to push changes after $MAX_RETRIES attempts"
+ COMMIT_ERRORS="$COMMIT_ERRORS\n- Failed to push changes after $MAX_RETRIES attempts"
+ COMMIT_SUCCESS=false
+ fi
+ else
+ echo "❌ Failed to create commit"
+ COMMIT_ERRORS="$COMMIT_ERRORS\n- Failed to create git commit"
COMMIT_SUCCESS=false
fi
else
- echo "❌ Failed to create commit"
- COMMIT_ERRORS="$COMMIT_ERRORS\n- Failed to create git commit"
- COMMIT_SUCCESS=false
+ echo "ℹ️ No changes to commit"
+ fi
+ fi
+
+ # Set outputs for later steps
+ echo "success=$COMMIT_SUCCESS" >> $GITHUB_OUTPUT
+
+ if [ -n "$COMMIT_ERRORS" ]; then
+ echo "commit_errors<> $GITHUB_OUTPUT
+ echo -e "$COMMIT_ERRORS" >> $GITHUB_OUTPUT
+ echo "EOF" >> $GITHUB_OUTPUT
+ echo "has_commit_errors=true" >> $GITHUB_OUTPUT
+ else
+ echo "has_commit_errors=false" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Read release notes
+ id: read_notes
+ if: |
+ (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
+ steps.release.outputs.release_notes_file != '' &&
+ steps.release.outputs.version_changed == 'true'
+ run: |
+ cd v3
+ if [ -f "release-notes.txt" ]; then
+ # Read the release notes and add header
+ echo "### Changes in this release:" > formatted-release-notes.txt
+ echo "" >> formatted-release-notes.txt
+ cat release-notes.txt >> formatted-release-notes.txt
+
+ # Read the formatted notes for output
+ RELEASE_NOTES=$(cat formatted-release-notes.txt)
+ echo "release_notes<> $GITHUB_OUTPUT
+ echo "$RELEASE_NOTES" >> $GITHUB_OUTPUT
+ echo "EOF" >> $GITHUB_OUTPUT
+ else
+ echo "release_notes=No release notes available" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Test GitHub Release Creation (DRY RUN)
+ if: |
+ (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
+ github.event.inputs.dry_run == 'true' &&
+ steps.release.outputs.version_changed == 'true'
+ run: |
+ echo "🧪 DRY RUN: Would create GitHub release with the following parameters:"
+ echo "======================================================================="
+ echo "Tag Name: ${{ steps.release.outputs.tag }}"
+ echo "Release Name: ${{ steps.release.outputs.title }}"
+ echo "Is Prerelease: ${{ steps.release.outputs.is_prerelease }}"
+ echo "Is Latest: ${{ steps.release.outputs.is_latest }}"
+ echo "Has Changes: ${{ steps.release.outputs.has_changes }}"
+ echo ""
+ echo "Release Body Preview:"
+ echo "## Wails v3 Alpha Release - ${{ steps.release.outputs.version }}"
+ echo ""
+ cat << 'RELEASE_NOTES_EOF'
+ ${{ steps.read_notes.outputs.release_notes }}
+ RELEASE_NOTES_EOF
+ echo ""
+ echo ""
+ echo ""
+ echo "---"
+ echo ""
+ echo "🤖 This is an automated nightly release generated from the latest changes in the v3-alpha branch."
+ echo ""
+ echo "**Installation:**"
+ echo "\`\`\`bash"
+ echo "go install github.com/wailsapp/wails/v3/cmd/wails@${{ steps.release.outputs.tag }}"
+ echo "\`\`\`"
+ echo ""
+ echo "**⚠️ Alpha Warning:** This is pre-release software and may contain bugs or incomplete features."
+ echo ""
+ echo "✅ DRY RUN: GitHub release creation test completed successfully!"
+
+ - name: Create GitHub Release (LIVE)
+ id: github_release
+ if: |
+ (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
+ github.event.inputs.dry_run != 'true' &&
+ steps.release.outputs.success == 'true' &&
+ steps.release.outputs.version_changed == 'true'
+ continue-on-error: true
+ run: |
+ echo "🚀 Creating GitHub release using gh CLI..."
+
+ # Create release notes in a temporary file
+ cat > release_notes.md << 'EOF'
+ ## Wails v3 Alpha Release - ${{ steps.release.outputs.version }}
+
+ ${{ steps.read_notes.outputs.release_notes }}
+
+
+
+ ---
+
+ 🤖 This is an automated nightly release generated from the latest changes in the v3-alpha branch.
+
+ **Installation:**
+ ```bash
+ go install github.com/wailsapp/wails/v3/cmd/wails@${{ steps.release.outputs.tag }}
+ ```
+
+ **⚠️ Alpha Warning:** This is pre-release software and may contain bugs or incomplete features.
+ EOF
+
+ # Create the release
+ if gh release create "${{ steps.release.outputs.tag }}" \
+ --title "${{ steps.release.outputs.title }}" \
+ --notes-file release_notes.md \
+ --target v3-alpha \
+ --prerelease; then
+ echo "✅ Successfully created GitHub release"
+ echo "outcome=success" >> $GITHUB_OUTPUT
+ else
+ echo "❌ Failed to create GitHub release"
+ echo "outcome=failure" >> $GITHUB_OUTPUT
+ fi
+ env:
+ GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+
+ - name: Handle GitHub Release Creation Result
+ id: release_result
+ if: |
+ (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
+ github.event.inputs.dry_run != 'true' &&
+ steps.release.outputs.success == 'true' &&
+ steps.release.outputs.version_changed == 'true'
+ run: |
+ echo "📋 Checking GitHub release creation result..."
+
+ # Initialize error tracking
+ GITHUB_ERRORS=""
+ GITHUB_SUCCESS=true
+
+ # Check if GitHub release creation succeeded
+ if [ "${{ steps.github_release.outcome }}" == "success" ]; then
+ echo "✅ GitHub release created successfully"
+ echo "🔗 Release URL: https://github.com/${{ github.repository }}/releases/tag/${{ steps.release.outputs.tag }}"
+ else
+ echo "❌ GitHub release creation failed"
+ GITHUB_ERRORS="$GITHUB_ERRORS\n- GitHub release creation failed with outcome: ${{ steps.github_release.outcome }}"
+ GITHUB_SUCCESS=false
+ fi
+
+ # Set outputs for summary
+ echo "success=$GITHUB_SUCCESS" >> $GITHUB_OUTPUT
+
+ if [ -n "$GITHUB_ERRORS" ]; then
+ echo "github_errors<> $GITHUB_OUTPUT
+ echo -e "$GITHUB_ERRORS" >> $GITHUB_OUTPUT
+ echo "EOF" >> $GITHUB_OUTPUT
+ echo "has_github_errors=true" >> $GITHUB_OUTPUT
+ else
+ echo "has_github_errors=false" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Error Summary and Reporting
+ id: error_summary
+ if: always()
+ run: |
+ echo "📊 Generating comprehensive error summary..."
+
+ # Initialize error tracking
+ TOTAL_ERRORS=0
+ ERROR_SUMMARY=""
+ OVERALL_SUCCESS=true
+
+ # Check for changelog errors
+ if [ "${{ steps.changelog_check.outputs.has_errors }}" == "true" ]; then
+ echo "❌ Changelog processing errors detected"
+ ERROR_SUMMARY="$ERROR_SUMMARY\n### 📄 Changelog Processing Errors\n${{ steps.changelog_check.outputs.changelog_errors }}\n"
+ TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
+ OVERALL_SUCCESS=false
+ fi
+
+ # Check for release script errors
+ if [ "${{ steps.release.outputs.has_release_errors }}" == "true" ]; then
+ echo "❌ Release script errors detected"
+ ERROR_SUMMARY="$ERROR_SUMMARY\n### 🚀 Release Script Errors\n${{ steps.release.outputs.release_errors }}\n"
+ TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
+ OVERALL_SUCCESS=false
+ fi
+
+ # Check for git tag errors
+ if [ "${{ steps.git_tag.outputs.has_git_errors }}" == "true" ]; then
+ echo "❌ Git tag errors detected"
+ ERROR_SUMMARY="$ERROR_SUMMARY\n### 🏷️ Git Tag Errors\n${{ steps.git_tag.outputs.git_tag_errors }}\n"
+ TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
+ OVERALL_SUCCESS=false
+ fi
+
+ # Check for git commit errors
+ if [ "${{ steps.git_commit.outputs.has_commit_errors }}" == "true" ]; then
+ echo "❌ Git commit errors detected"
+ ERROR_SUMMARY="$ERROR_SUMMARY\n### 📝 Git Commit Errors\n${{ steps.git_commit.outputs.commit_errors }}\n"
+ TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
+ OVERALL_SUCCESS=false
+ fi
+
+ # Check for GitHub release errors
+ if [ "${{ steps.release_result.outputs.has_github_errors }}" == "true" ]; then
+ echo "❌ GitHub release errors detected"
+ ERROR_SUMMARY="$ERROR_SUMMARY\n### 🐙 GitHub Release Errors\n${{ steps.release_result.outputs.github_errors }}\n"
+ TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
+ OVERALL_SUCCESS=false
+ fi
+
+ # Set outputs for final summary
+ echo "total_errors=$TOTAL_ERRORS" >> $GITHUB_OUTPUT
+ echo "overall_success=$OVERALL_SUCCESS" >> $GITHUB_OUTPUT
+
+ if [ -n "$ERROR_SUMMARY" ]; then
+ echo "error_summary<> $GITHUB_OUTPUT
+ echo -e "$ERROR_SUMMARY" >> $GITHUB_OUTPUT
+ echo "EOF" >> $GITHUB_OUTPUT
+ fi
+
+ # Log summary
+ if [ "$OVERALL_SUCCESS" == "true" ]; then
+ echo "✅ Workflow completed successfully with no errors"
+ else
+ echo "⚠️ Workflow completed with $TOTAL_ERRORS error categories"
+ fi
+
+ - name: Summary
+ if: always()
+ run: |
+ if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
+ echo "## 🧪 DRY RUN Release Test Summary" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "## 🚀 Nightly Release Summary" >> $GITHUB_STEP_SUMMARY
+ fi
+ echo "================================" >> $GITHUB_STEP_SUMMARY
+ echo "- **Version:** ${{ steps.release.outputs.version }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Tag:** ${{ steps.release.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Version Changed:** ${{ steps.release.outputs.version_changed }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Has existing tag:** ${{ steps.check_tag.outputs.has_tag }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Has unreleased changelog content:** ${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Has changes:** ${{ steps.release.outputs.has_changes }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Is prerelease:** ${{ steps.release.outputs.is_prerelease }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Is latest:** ${{ steps.release.outputs.is_latest }}" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+
+ # Overall status
+ if [ "${{ steps.error_summary.outputs.overall_success }}" == "true" ]; then
+ if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
+ echo "- **Mode:** 🧪 DRY RUN (no actual release created)" >> $GITHUB_STEP_SUMMARY
+ echo "- **Status:** ✅ Test completed successfully" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "- **Mode:** 🚀 Live release" >> $GITHUB_STEP_SUMMARY
+ echo "- **Status:** ✅ Release created successfully" >> $GITHUB_STEP_SUMMARY
fi
else
- echo "ℹ️ No changes to commit"
+ echo "- **Mode:** ${{ github.event.inputs.dry_run == 'true' && '🧪 DRY RUN' || '🚀 Live release' }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Status:** ⚠️ Completed with ${{ steps.error_summary.outputs.total_errors }} error(s)" >> $GITHUB_STEP_SUMMARY
fi
- fi
-
- # Set outputs for later steps
- echo "success=$COMMIT_SUCCESS" >> $GITHUB_OUTPUT
-
- if [ -n "$COMMIT_ERRORS" ]; then
- echo "commit_errors<> $GITHUB_OUTPUT
- echo -e "$COMMIT_ERRORS" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- echo "has_commit_errors=true" >> $GITHUB_OUTPUT
- else
- echo "has_commit_errors=false" >> $GITHUB_OUTPUT
- fi
-
- - name: Read release notes
- id: read_notes
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- steps.release.outputs.release_notes_file != '' &&
- steps.release.outputs.version_changed == 'true'
- run: |
- cd v3
- if [ -f "release-notes.txt" ]; then
- # Read the release notes and add header
- echo "### Changes in this release:" > formatted-release-notes.txt
- echo "" >> formatted-release-notes.txt
- cat release-notes.txt >> formatted-release-notes.txt
- # Read the formatted notes for output
- RELEASE_NOTES=$(cat formatted-release-notes.txt)
- echo "release_notes<> $GITHUB_OUTPUT
- echo "$RELEASE_NOTES" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- else
- echo "release_notes=No release notes available" >> $GITHUB_OUTPUT
- fi
-
- - name: Test GitHub Release Creation (DRY RUN)
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- github.event.inputs.dry_run == 'true' &&
- steps.release.outputs.version_changed == 'true'
- run: |
- echo "🧪 DRY RUN: Would create GitHub release with the following parameters:"
- echo "======================================================================="
- echo "Tag Name: ${{ steps.release.outputs.tag }}"
- echo "Release Name: ${{ steps.release.outputs.title }}"
- echo "Is Prerelease: ${{ steps.release.outputs.is_prerelease }}"
- echo "Is Latest: ${{ steps.release.outputs.is_latest }}"
- echo "Has Changes: ${{ steps.release.outputs.has_changes }}"
- echo ""
- echo "Release Body Preview:"
- echo "## Wails v3 Alpha Release - ${{ steps.release.outputs.version }}"
- echo ""
- cat << 'RELEASE_NOTES_EOF'
- ${{ steps.read_notes.outputs.release_notes }}
- RELEASE_NOTES_EOF
- echo ""
- echo ""
- echo ""
- echo "---"
- echo ""
- echo "🤖 This is an automated nightly release generated from the latest changes in the v3-alpha branch."
- echo ""
- echo "**Installation:**"
- echo "\`\`\`bash"
- echo "go install github.com/wailsapp/wails/v3/cmd/wails@${{ steps.release.outputs.tag }}"
- echo "\`\`\`"
- echo ""
- echo "**⚠️ Alpha Warning:** This is pre-release software and may contain bugs or incomplete features."
- echo ""
- echo "✅ DRY RUN: GitHub release creation test completed successfully!"
-
- - name: Create GitHub Release (LIVE)
- id: github_release
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- github.event.inputs.dry_run != 'true' &&
- steps.release.outputs.success == 'true' &&
- steps.release.outputs.version_changed == 'true'
- continue-on-error: true
- run: |
- echo "🚀 Creating GitHub release using gh CLI..."
-
- # Create release notes in a temporary file
- cat > release_notes.md << 'EOF'
- ## Wails v3 Alpha Release - ${{ steps.release.outputs.version }}
-
- ${{ steps.read_notes.outputs.release_notes }}
-
-
-
- ---
-
- 🤖 This is an automated nightly release generated from the latest changes in the v3-alpha branch.
-
- **Installation:**
- ```bash
- go install github.com/wailsapp/wails/v3/cmd/wails@${{ steps.release.outputs.tag }}
- ```
-
- **⚠️ Alpha Warning:** This is pre-release software and may contain bugs or incomplete features.
- EOF
-
- # Create the release
- if gh release create "${{ steps.release.outputs.tag }}" \
- --title "${{ steps.release.outputs.title }}" \
- --notes-file release_notes.md \
- --target v3-alpha \
- --prerelease; then
- echo "✅ Successfully created GitHub release"
- echo "outcome=success" >> $GITHUB_OUTPUT
- else
- echo "❌ Failed to create GitHub release"
- echo "outcome=failure" >> $GITHUB_OUTPUT
- fi
- env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
-
- - name: Handle GitHub Release Creation Result
- id: release_result
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- github.event.inputs.dry_run != 'true' &&
- steps.release.outputs.success == 'true' &&
- steps.release.outputs.version_changed == 'true'
- run: |
- echo "📋 Checking GitHub release creation result..."
-
- # Initialize error tracking
- GITHUB_ERRORS=""
- GITHUB_SUCCESS=true
-
- # Check if GitHub release creation succeeded
- if [ "${{ steps.github_release.outcome }}" == "success" ]; then
- echo "✅ GitHub release created successfully"
- echo "🔗 Release URL: https://github.com/${{ github.repository }}/releases/tag/${{ steps.release.outputs.tag }}"
- else
- echo "❌ GitHub release creation failed"
- GITHUB_ERRORS="$GITHUB_ERRORS\n- GitHub release creation failed with outcome: ${{ steps.github_release.outcome }}"
- GITHUB_SUCCESS=false
- fi
-
- # Set outputs for summary
- echo "success=$GITHUB_SUCCESS" >> $GITHUB_OUTPUT
-
- if [ -n "$GITHUB_ERRORS" ]; then
- echo "github_errors<> $GITHUB_OUTPUT
- echo -e "$GITHUB_ERRORS" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- echo "has_github_errors=true" >> $GITHUB_OUTPUT
- else
- echo "has_github_errors=false" >> $GITHUB_OUTPUT
- fi
-
- - name: Error Summary and Reporting
- id: error_summary
- if: always()
- run: |
- echo "📊 Generating comprehensive error summary..."
-
- # Initialize error tracking
- TOTAL_ERRORS=0
- ERROR_SUMMARY=""
- OVERALL_SUCCESS=true
-
- # Check for changelog errors
- if [ "${{ steps.changelog_check.outputs.has_errors }}" == "true" ]; then
- echo "❌ Changelog processing errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 📄 Changelog Processing Errors\n${{ steps.changelog_check.outputs.changelog_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for release script errors
- if [ "${{ steps.release.outputs.has_release_errors }}" == "true" ]; then
- echo "❌ Release script errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 🚀 Release Script Errors\n${{ steps.release.outputs.release_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for git tag errors
- if [ "${{ steps.git_tag.outputs.has_git_errors }}" == "true" ]; then
- echo "❌ Git tag errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 🏷️ Git Tag Errors\n${{ steps.git_tag.outputs.git_tag_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for git commit errors
- if [ "${{ steps.git_commit.outputs.has_commit_errors }}" == "true" ]; then
- echo "❌ Git commit errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 📝 Git Commit Errors\n${{ steps.git_commit.outputs.commit_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for GitHub release errors
- if [ "${{ steps.release_result.outputs.has_github_errors }}" == "true" ]; then
- echo "❌ GitHub release errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 🐙 GitHub Release Errors\n${{ steps.release_result.outputs.github_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Set outputs for final summary
- echo "total_errors=$TOTAL_ERRORS" >> $GITHUB_OUTPUT
- echo "overall_success=$OVERALL_SUCCESS" >> $GITHUB_OUTPUT
-
- if [ -n "$ERROR_SUMMARY" ]; then
- echo "error_summary<> $GITHUB_OUTPUT
- echo -e "$ERROR_SUMMARY" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- fi
-
- # Log summary
- if [ "$OVERALL_SUCCESS" == "true" ]; then
- echo "✅ Workflow completed successfully with no errors"
- else
- echo "⚠️ Workflow completed with $TOTAL_ERRORS error categories"
- fi
-
- - name: Summary
- if: always()
- run: |
- DRY_RUN_INPUT="${{ github.event.inputs.dry_run }}"; [ -z "$DRY_RUN_INPUT" ] && DRY_RUN_INPUT=false
- if [ "$DRY_RUN_INPUT" == "true" ]; then
- echo "## 🧪 DRY RUN Release Test Summary" >> $GITHUB_STEP_SUMMARY
- else
- echo "## 🚀 Nightly Release Summary" >> $GITHUB_STEP_SUMMARY
- fi
- echo "================================" >> $GITHUB_STEP_SUMMARY
- echo "- **Version:** ${{ steps.release.outputs.version }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Tag:** ${{ steps.release.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Version Changed:** ${{ steps.release.outputs.version_changed }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Has existing tag:** ${{ steps.check_tag.outputs.has_tag }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Has unreleased changelog content:** ${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Has changes:** ${{ steps.release.outputs.has_changes }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Is prerelease:** ${{ steps.release.outputs.is_prerelease }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Is latest:** ${{ steps.release.outputs.is_latest }}" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
-
- # Overall status
- if [ "${{ steps.error_summary.outputs.overall_success }}" == "true" ]; then
- if [ "$DRY_RUN_INPUT" == "true" ]; then
- echo "- **Mode:** 🧪 DRY RUN (no actual release created)" >> $GITHUB_STEP_SUMMARY
- echo "- **Status:** ✅ Test completed successfully" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### Release Processing" >> $GITHUB_STEP_SUMMARY
+ if [ "${{ steps.release.outputs.version_changed }}" == "true" ]; then
+ echo "✅ **Version was incremented** and release created" >> $GITHUB_STEP_SUMMARY
else
- echo "- **Mode:** 🚀 Live release" >> $GITHUB_STEP_SUMMARY
- echo "- **Status:** ✅ Release created successfully" >> $GITHUB_STEP_SUMMARY
+ echo "ℹ️ **Version was not changed** - no release created" >> $GITHUB_STEP_SUMMARY
fi
- else
- echo "- **Mode:** ${{ github.event.inputs.dry_run == 'true' && '🧪 DRY RUN' || '🚀 Live release' }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Status:** ⚠️ Completed with ${{ steps.error_summary.outputs.total_errors }} error(s)" >> $GITHUB_STEP_SUMMARY
- fi
-
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### Release Processing" >> $GITHUB_STEP_SUMMARY
- if [ "${{ steps.release.outputs.version_changed }}" == "true" ]; then
- echo "✅ **Version was incremented** and release created" >> $GITHUB_STEP_SUMMARY
- else
- echo "ℹ️ **Version was not changed** - no release created" >> $GITHUB_STEP_SUMMARY
- fi
-
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### Changelog Processing" >> $GITHUB_STEP_SUMMARY
- if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
- echo "✅ **UNRELEASED_CHANGELOG.md** had content and was processed" >> $GITHUB_STEP_SUMMARY
- echo "- Content moved to main changelog" >> $GITHUB_STEP_SUMMARY
- echo "- UNRELEASED_CHANGELOG.md reset with template" >> $GITHUB_STEP_SUMMARY
- else
- echo "ℹ️ **UNRELEASED_CHANGELOG.md** had no content to process" >> $GITHUB_STEP_SUMMARY
- fi
-
- # Error reporting section
- ERRORS_TOTAL="${{ steps.error_summary.outputs.total_errors }}"
- ERRORS_TOTAL=${ERRORS_TOTAL:-0}
- if [ "$ERRORS_TOTAL" -gt 0 ]; then
+
echo "" >> $GITHUB_STEP_SUMMARY
- echo "## ⚠️ Error Report" >> $GITHUB_STEP_SUMMARY
- echo "**Total Error Categories:** $ERRORS_TOTAL" >> $GITHUB_STEP_SUMMARY
+ echo "### Changelog Processing" >> $GITHUB_STEP_SUMMARY
+ if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
+ echo "✅ **UNRELEASED_CHANGELOG.md** had content and was processed" >> $GITHUB_STEP_SUMMARY
+ echo "- Content moved to main changelog" >> $GITHUB_STEP_SUMMARY
+ echo "- UNRELEASED_CHANGELOG.md reset with template" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "ℹ️ **UNRELEASED_CHANGELOG.md** had no content to process" >> $GITHUB_STEP_SUMMARY
+ fi
+
+ # Error reporting section
+ if [ "${{ steps.error_summary.outputs.total_errors }}" -gt 0 ]; then
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "## ⚠️ Error Report" >> $GITHUB_STEP_SUMMARY
+ echo "**Total Error Categories:** ${{ steps.error_summary.outputs.total_errors }}" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "${{ steps.error_summary.outputs.error_summary }}" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### 🔧 Troubleshooting Tips" >> $GITHUB_STEP_SUMMARY
+ echo "- Check the individual step logs above for detailed error messages" >> $GITHUB_STEP_SUMMARY
+ echo "- Verify GitHub token permissions (contents: write, pull-requests: read)" >> $GITHUB_STEP_SUMMARY
+ echo "- Ensure UNRELEASED_CHANGELOG.md follows the expected format" >> $GITHUB_STEP_SUMMARY
+ echo "- Check for network connectivity issues if git/GitHub operations failed" >> $GITHUB_STEP_SUMMARY
+ echo "- Re-run the workflow with 'force_release=true' if needed" >> $GITHUB_STEP_SUMMARY
+ fi
+
echo "" >> $GITHUB_STEP_SUMMARY
- echo "${{ steps.error_summary.outputs.error_summary }}" >> $GITHUB_STEP_SUMMARY
+ echo "### Release Notes Preview" >> $GITHUB_STEP_SUMMARY
+ if [ -n "${{ steps.read_notes.outputs.release_notes }}" ]; then
+ echo "${{ steps.read_notes.outputs.release_notes }}" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "No specific release notes generated" >> $GITHUB_STEP_SUMMARY
+ fi
echo "" >> $GITHUB_STEP_SUMMARY
- echo "### 🔧 Troubleshooting Tips" >> $GITHUB_STEP_SUMMARY
- echo "- Check the individual step logs above for detailed error messages" >> $GITHUB_STEP_SUMMARY
- echo "- Verify GitHub token permissions (contents: write, pull-requests: read)" >> $GITHUB_STEP_SUMMARY
- echo "- Ensure UNRELEASED_CHANGELOG.md follows the expected format" >> $GITHUB_STEP_SUMMARY
- echo "- Check for network connectivity issues if git/GitHub operations failed" >> $GITHUB_STEP_SUMMARY
- echo "- Re-run the workflow with 'force_release=true' if needed" >> $GITHUB_STEP_SUMMARY
- fi
-
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### Release Notes Preview" >> $GITHUB_STEP_SUMMARY
- if [ -n "${{ steps.read_notes.outputs.release_notes }}" ]; then
- echo "${{ steps.read_notes.outputs.release_notes }}" >> $GITHUB_STEP_SUMMARY
- else
- echo "No specific release notes generated" >> $GITHUB_STEP_SUMMARY
- fi
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "---" >> $GITHUB_STEP_SUMMARY
- echo "*Generated by automated nightly release workflow with enhanced error handling and changelog integration*" >> $GITHUB_STEP_SUMMARY
-
- # Set final workflow status
- if [ "${{ steps.error_summary.outputs.overall_success }}" != "true" ]; then
- echo "⚠️ Workflow completed with errors. Check the summary above for details."
- exit 1
- fi
+ echo "---" >> $GITHUB_STEP_SUMMARY
+ echo "*Generated by automated nightly release workflow with enhanced error handling and changelog integration*" >> $GITHUB_STEP_SUMMARY
+
+ # Set final workflow status
+ if [ "${{ steps.error_summary.outputs.overall_success }}" != "true" ]; then
+ echo "⚠️ Workflow completed with errors. Check the summary above for details."
+ exit 1
+ fi
\ No newline at end of file
From 855dcadd79b037360a9d4d906e08dd1e0b42ea38 Mon Sep 17 00:00:00 2001
From: Lea Anthony
Date: Wed, 10 Sep 2025 07:55:01 +1000
Subject: [PATCH 11/99] ci(v3-alpha): nightly release uses PAT for writes;
order: notes -> bump version.txt -> commit -> tag
---
.github/workflows/nightly-release-v3.yml | 1225 +++++++++-------------
1 file changed, 514 insertions(+), 711 deletions(-)
diff --git a/.github/workflows/nightly-release-v3.yml b/.github/workflows/nightly-release-v3.yml
index 5f5c06ee8..426e45589 100644
--- a/.github/workflows/nightly-release-v3.yml
+++ b/.github/workflows/nightly-release-v3.yml
@@ -27,737 +27,540 @@ jobs:
actions: write
steps:
- - name: Checkout code
- uses: actions/checkout@v4
- with:
- ref: v3-alpha
- fetch-depth: 0
- token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
-
- - name: Setup Go
- uses: actions/setup-go@v5
- with:
- go-version: '1.23'
- cache-dependency-path: 'v3/go.sum'
-
- - name: Install Task
- uses: arduino/setup-task@v2
- with:
- version: 3.x
- repo-token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Verify Go and Task installation
- run: |
- echo "Go version:"
- go version
- echo ""
- echo "Task version:"
- task --version
- echo ""
- echo "Working directory:"
- pwd
- echo ""
- echo "v3 directory contents:"
- ls -la v3/
-
- - name: Setup Git
- run: |
- git config --global user.name "github-actions[bot]"
- git config --global user.email "github-actions[bot]@users.noreply.github.com"
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ ref: v3-alpha
+ fetch-depth: 0
+ token: ${{ github.token }}
+
+ - name: Setup Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: '1.23'
+ cache-dependency-path: 'v3/go.sum'
+
+ - name: Install Task
+ uses: arduino/setup-task@v2
+ with:
+ version: 3.x
+ repo-token: ${{ github.token }}
+
+ - name: Verify Go and Task installation
+ run: |
+ echo "Go version:"
+ go version
+ echo ""
+ echo "Task version:"
+ task --version
+ echo ""
+ echo "Working directory:"
+ pwd
+ echo ""
+ echo "v3 directory contents:"
+ ls -la v3/
+
+ - name: Setup Git
+ run: |
+ git config --global user.name "github-actions[bot]"
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
+
+ # Configure git to use the token for authentication
+ git config --global url."https://x-access-token:${{ github.token }}@github.com/".insteadOf "https://github.com/"
+
+ - name: Check for existing release tag
+ id: check_tag
+ run: |
+ if git describe --tags --exact-match HEAD 2>/dev/null; then
+ echo "has_tag=true" >> $GITHUB_OUTPUT
+ echo "tag=$(git describe --tags --exact-match HEAD)" >> $GITHUB_OUTPUT
+ else
+ echo "has_tag=false" >> $GITHUB_OUTPUT
+ echo "tag=" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Check for unreleased changelog content
+ id: changelog_check
+ run: |
+ echo "🔍 Checking UNRELEASED_CHANGELOG.md for content..."
+
+ # Check if the file exists and has content
+ if [ -f "v3/UNRELEASED_CHANGELOG.md" ]; then
+ echo "Found v3/UNRELEASED_CHANGELOG.md"
- # Configure git to use the token for authentication
- git config --global url."https://x-access-token:${{ secrets.WAILS_REPO_TOKEN || github.token }}@github.com/".insteadOf "https://github.com/"
-
- - name: Check for existing release tag
- id: check_tag
- run: |
- if git describe --tags --exact-match HEAD 2>/dev/null; then
- echo "has_tag=true" >> $GITHUB_OUTPUT
- echo "tag=$(git describe --tags --exact-match HEAD)" >> $GITHUB_OUTPUT
+ # Run the release script in check mode to see if there's content
+ cd v3/tasks/release
+
+ # Use the release script itself to check for content
+ if go run release.go --check-only 2>/dev/null; then
+ echo "has_unreleased_content=true" >> $GITHUB_OUTPUT
+ echo "✅ Found unreleased changelog content"
else
- echo "has_tag=false" >> $GITHUB_OUTPUT
- echo "tag=" >> $GITHUB_OUTPUT
- fi
-
- - name: Check for unreleased changelog content
- id: changelog_check
- run: |
- echo "🔍 Checking UNRELEASED_CHANGELOG.md for content..."
-
- # Check if the file exists and has content
- if [ -f "v3/UNRELEASED_CHANGELOG.md" ]; then
- echo "Found v3/UNRELEASED_CHANGELOG.md"
-
- # Run the release script in check mode to see if there's content
- cd v3/tasks/release
-
- # Use the release script itself to check for content
- if go run release.go --check-only 2>/dev/null; then
- echo "has_unreleased_content=true" >> $GITHUB_OUTPUT
- echo "✅ Found unreleased changelog content"
- else
- echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
- echo "ℹ️ No unreleased changelog content found"
- fi
- else
- echo "⚠️ v3/UNRELEASED_CHANGELOG.md not found"
echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
+ echo "ℹ️ No unreleased changelog content found"
fi
+ else
+ echo "⚠️ v3/UNRELEASED_CHANGELOG.md not found"
+ echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
+ fi
- - name: Quick change detection and early exit
- id: quick_check
- run: |
- echo "🔍 Quick check for changes to determine if we should continue..."
+ - name: Quick change detection and early exit
+ id: quick_check
+ run: |
+ echo "🔍 Quick check for changes to determine if we should continue..."
+
+ # First check if we have unreleased changelog content
+ if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
+ echo "✅ Found unreleased changelog content, proceeding with release"
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "should_continue=true" >> $GITHUB_OUTPUT
+ echo "reason=Found unreleased changelog content" >> $GITHUB_OUTPUT
+ exit 0
+ fi
+
+ # If no unreleased changelog content, check for git changes as fallback
+ echo "No unreleased changelog content found, checking for git changes..."
+
+ # Check if current commit has a release tag
+ if git describe --tags --exact-match HEAD 2>/dev/null; then
+ CURRENT_TAG=$(git describe --tags --exact-match HEAD)
+ echo "Current commit has release tag: $CURRENT_TAG"
- # First check if we have unreleased changelog content
- if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
- echo "✅ Found unreleased changelog content, proceeding with release"
+ # Get the tag creation date
+ TAG_DATE=$(git log -1 --format=%aI "$CURRENT_TAG")
+ if [ -z "$TAG_DATE" ]; then
+ echo "Failed to obtain tag date, proceeding with conservative fallback"
+ TAG_DATE="1970-01-01T00:00:00Z"
+ fi
+ echo "Tag date: $TAG_DATE"
+
+ # Compare this commit date with tag date
+ COMMIT_DATE=$(git log -1 --format=%aI HEAD)
+ echo "Commit date: $COMMIT_DATE"
+
+ # If the commit is newer than the tag, then it means there are changes
+ if [ "$COMMIT_DATE" \> "$TAG_DATE" ]; then
+ echo "Commit is newer than the tag. Proceeding with release."
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "should_continue=true" >> $GITHUB_OUTPUT
- echo "reason=Found unreleased changelog content" >> $GITHUB_OUTPUT
- exit 0
- fi
-
- # If no unreleased changelog content, check for git changes as fallback
- echo "No unreleased changelog content found, checking for git changes..."
-
- # Check if current commit has a release tag
- if git describe --tags --exact-match HEAD 2>/dev/null; then
- CURRENT_TAG=$(git describe --tags --exact-match HEAD)
- echo "Current commit has release tag: $CURRENT_TAG"
-
- # For tagged commits, check if there are changes since the tag
- COMMIT_COUNT=$(git rev-list ${CURRENT_TAG}..HEAD --count)
- if [ "$COMMIT_COUNT" -eq 0 ]; then
- echo "has_changes=false" >> $GITHUB_OUTPUT
- echo "should_continue=false" >> $GITHUB_OUTPUT
- echo "reason=No changes since existing tag $CURRENT_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
- else
- echo "has_changes=true" >> $GITHUB_OUTPUT
- echo "should_continue=true" >> $GITHUB_OUTPUT
- fi
+ echo "reason=Commit newer than tag" >> $GITHUB_OUTPUT
else
- # No current tag, check against latest release
- LATEST_TAG=$(git tag --list "v3.0.0-alpha.*" | sort -V | tail -1)
- if [ -z "$LATEST_TAG" ]; then
- echo "No previous release found, proceeding with release"
- echo "has_changes=true" >> $GITHUB_OUTPUT
- echo "should_continue=true" >> $GITHUB_OUTPUT
- else
- COMMIT_COUNT=$(git rev-list ${LATEST_TAG}..HEAD --count)
- if [ "$COMMIT_COUNT" -gt 0 ]; then
- echo "Found $COMMIT_COUNT commits since $LATEST_TAG"
- echo "has_changes=true" >> $GITHUB_OUTPUT
- echo "should_continue=true" >> $GITHUB_OUTPUT
- else
- echo "has_changes=false" >> $GITHUB_OUTPUT
- echo "should_continue=false" >> $GITHUB_OUTPUT
- echo "reason=No changes since latest release $LATEST_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
- fi
- fi
+ echo "Commit is the same as the tag. No new changes."
+ echo "has_changes=false" >> $GITHUB_OUTPUT
+ echo "should_continue=false" >> $GITHUB_OUTPUT
+ echo "reason=No changes since existing tag $CURRENT_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
fi
-
- - name: Early exit - No changes detected
- if: |
- steps.quick_check.outputs.should_continue == 'false' &&
- github.event.inputs.force_release != 'true'
- run: |
- echo "🛑 EARLY EXIT: ${{ steps.quick_check.outputs.reason }}"
- echo ""
- echo "ℹ️ No changes detected since last release and force_release is not enabled."
- echo " Workflow will exit early to save resources."
- echo ""
- echo " To force a release anyway, run this workflow with 'force_release=true'"
- echo ""
- echo "## 🛑 Early Exit Summary" >> $GITHUB_STEP_SUMMARY
- echo "**Reason:** ${{ steps.quick_check.outputs.reason }}" >> $GITHUB_STEP_SUMMARY
- echo "**Action:** Workflow exited early to save resources" >> $GITHUB_STEP_SUMMARY
- echo "**Force Release:** Set 'force_release=true' to override this behavior" >> $GITHUB_STEP_SUMMARY
exit 0
+ fi
+
+ echo "Checking against the latest existing release tag..."
+
+ # Find the latest release tag matching v3-alpha
+ LATEST_TAG=$(git tag --list 'v3.0.0-alpha.*' --sort=-v:refname | head -n 1)
+ echo "Latest tag: $LATEST_TAG"
+
+ if [ -z "$LATEST_TAG" ]; then
+ echo "No previous release found, proceeding with release"
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "should_continue=true" >> $GITHUB_OUTPUT
+ echo "reason=No previous tag found" >> $GITHUB_OUTPUT
+ exit 0
+ fi
+
+ # Compare against the latest release tag
+ if git diff --quiet "$LATEST_TAG"..HEAD -- v3; then
+ echo "No changes detected since latest release $LATEST_TAG and no unreleased changelog content"
+ echo "has_changes=false" >> $GITHUB_OUTPUT
+ echo "should_continue=false" >> $GITHUB_OUTPUT
+ echo "reason=No changes since latest release $LATEST_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
+ else
+ echo "Changes detected since latest release $LATEST_TAG"
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "should_continue=true" >> $GITHUB_OUTPUT
+ echo "reason=Changes detected since latest release $LATEST_TAG" >> $GITHUB_OUTPUT
+ fi
- - name: Continue with release process
- if: |
- steps.quick_check.outputs.should_continue == 'true' ||
- github.event.inputs.force_release == 'true'
- run: |
- echo "✅ Proceeding with release process..."
- if [ "${{ github.event.inputs.force_release }}" == "true" ]; then
- echo "🔨 FORCE RELEASE: Overriding change detection"
- fi
+ - name: Early exit if no changes and not forced
+ if: >-
+ steps.quick_check.outputs.should_continue == 'false' &&
+ github.event.inputs.force_release != 'true'
+ run: |
+ echo "ℹ️ No changes detected since last release and force_release is not enabled."
+ echo " Skipping release to avoid unnecessary version churn."
+ echo " To force a release anyway, run this workflow with 'force_release=true'"
+
+ # Add summary to GITHUB_STEP_SUMMARY
+ echo "### Nightly Release Skipped" >> $GITHUB_STEP_SUMMARY
+ echo "- Reason: ${{ steps.quick_check.outputs.reason }}" >> $GITHUB_STEP_SUMMARY
+ echo "- Has unreleased changelog content: ${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_STEP_SUMMARY
+ echo "- Force release: ${{ github.event.inputs.force_release || 'false' }}" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "**Force Release:** Set 'force_release=true' to override this behavior" >> $GITHUB_STEP_SUMMARY
+
+ exit 0
- - name: Extract changelog content before release
- id: extract_changelog
- if: |
- steps.quick_check.outputs.should_continue == 'true' ||
- github.event.inputs.force_release == 'true'
- run: |
- cd v3
-
- echo "📝 Extracting changelog content before release..."
-
- # Use the new --create-release-notes flag
- cd tasks/release
- if go run release.go --create-release-notes ../../release_notes.md; then
- echo "✅ Successfully created release notes"
- echo "has_content=true" >> $GITHUB_OUTPUT
-
- # Show content preview
- echo "Release notes preview:"
- head -10 ../../release_notes.md
- else
- echo "⚠️ Failed to create release notes or no content found"
- echo "No changelog updates in this release." > ../../release_notes.md
- echo "has_content=false" >> $GITHUB_OUTPUT
- fi
+ - name: Continue with release process
+ if: >-
+ steps.quick_check.outputs.should_continue == 'true' ||
+ github.event.inputs.force_release == 'true'
+ run: |
+ echo "✅ Proceeding with release process..."
+ if [ "${{ github.event.inputs.force_release }}" == "true" ]; then
+ echo "🚨 FORCE RELEASE: Overriding change detection"
+ fi
+
+ - name: Extract changelog content before release
+ if: >-
+ steps.changelog_check.outputs.has_unreleased_content == 'true' ||
+ github.event.inputs.force_release == 'true'
+ run: |
+ echo "📝 Extracting changelog content before release..."
+
+ # Use the new --create-release-notes flag
+ cd v3/tasks/release
+ if go run release.go --create-release-notes ../../release_notes.md; then
+ echo "✅ Successfully created release notes"
cd ../..
+
+ # Show release notes preview
+ echo "Release notes preview:"
+ head -10 ../../release_notes.md
+ else
+ echo "ℹ️ Could not create release notes, continuing without them"
+ cd ../..
+ fi
- - name: Run release script
- id: release
- if: |
- steps.quick_check.outputs.should_continue == 'true' ||
- github.event.inputs.force_release == 'true'
- run: |
- cd v3
-
- echo "🚀 Running release task..."
- echo "======================================================="
-
- # Initialize error tracking
- RELEASE_ERRORS=""
- RELEASE_SUCCESS=true
-
- # Store the original version for comparison
- ORIGINAL_VERSION=$(cat internal/version/version.txt 2>/dev/null || echo "unknown")
- echo "📌 Current version: $ORIGINAL_VERSION"
-
- # Run the release task and capture output with error handling
- if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
- echo "🧪 DRY RUN MODE: Simulating release task execution"
- # In dry run, we'll simulate the task without making actual changes
- OUTPUT=$(task release 2>&1 || true)
- RELEASE_EXIT_CODE=0 # Always succeed in dry run
- echo "$OUTPUT"
- else
- echo "🚀 LIVE MODE: Executing release task"
- OUTPUT=$(task release 2>&1)
- RELEASE_EXIT_CODE=$?
- echo "$OUTPUT"
-
- if [ $RELEASE_EXIT_CODE -ne 0 ]; then
- echo "❌ Release task failed with exit code $RELEASE_EXIT_CODE"
- RELEASE_ERRORS="$RELEASE_ERRORS\n- Release task execution failed: $OUTPUT"
- RELEASE_SUCCESS=false
- else
- echo "✅ Release task completed successfully"
- fi
- fi
-
- # Verify version file exists and is readable
- if [ ! -f "internal/version/version.txt" ]; then
- echo "❌ Version file not found: internal/version/version.txt"
- RELEASE_ERRORS="$RELEASE_ERRORS\n- Version file not found after release task execution"
- RELEASE_SUCCESS=false
- RELEASE_VERSION="unknown"
- else
- RELEASE_VERSION=$(cat internal/version/version.txt 2>/dev/null || echo "unknown")
- if [ "$RELEASE_VERSION" == "unknown" ]; then
- echo "❌ Failed to read version from file"
- RELEASE_ERRORS="$RELEASE_ERRORS\n- Failed to read version from version.txt"
- RELEASE_SUCCESS=false
- else
- echo "✅ Successfully read version: $RELEASE_VERSION"
- fi
- fi
-
- # Check if version changed
- VERSION_CHANGED="false"
- if [ "$ORIGINAL_VERSION" != "$RELEASE_VERSION" ] && [ "$RELEASE_VERSION" != "unknown" ]; then
- echo "✅ Version changed from $ORIGINAL_VERSION to $RELEASE_VERSION"
- VERSION_CHANGED="true"
- else
- echo "ℹ️ Version unchanged: $RELEASE_VERSION"
- fi
-
- RELEASE_TAG="${RELEASE_VERSION}"
- RELEASE_TITLE="Wails ${RELEASE_VERSION}"
-
- # Set outputs for next steps
- echo "version=$RELEASE_VERSION" >> $GITHUB_OUTPUT
- echo "tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
- echo "title=$RELEASE_TITLE" >> $GITHUB_OUTPUT
- echo "is_prerelease=true" >> $GITHUB_OUTPUT
- echo "is_latest=false" >> $GITHUB_OUTPUT
- echo "has_changes=${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_OUTPUT
- echo "success=$RELEASE_SUCCESS" >> $GITHUB_OUTPUT
- echo "version_changed=$VERSION_CHANGED" >> $GITHUB_OUTPUT
-
- # Copy pre-extracted release notes
- if [ "$RELEASE_SUCCESS" == "true" ]; then
- echo "📝 Using pre-extracted release notes..."
-
- # Use the release_notes.md file created earlier
- if [ -f "release_notes.md" ]; then
- cp release_notes.md release-notes.txt
- echo "✅ Successfully copied release notes"
- echo "release_notes_file=release-notes.txt" >> $GITHUB_OUTPUT
- else
- echo "ℹ️ No pre-extracted release notes found"
- echo "No detailed changelog available for this release." > release-notes.txt
- echo "release_notes_file=release-notes.txt" >> $GITHUB_OUTPUT
- fi
- else
- echo "release_notes_file=" >> $GITHUB_OUTPUT
- echo "⚠️ Skipping release notes generation due to release task failure"
- fi
-
- # Set error output for later steps
- if [ -n "$RELEASE_ERRORS" ]; then
- echo "release_errors<> $GITHUB_OUTPUT
- echo -e "$RELEASE_ERRORS" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- echo "has_release_errors=true" >> $GITHUB_OUTPUT
- else
- echo "has_release_errors=false" >> $GITHUB_OUTPUT
- fi
+ - name: Process release and bump version
+ id: process_release
+ run: |
+ echo "🔢 Processing release: updating changelog and bumping version.txt"
+ cd v3/tasks/release
+ # Run release processing (updates internal/version/version.txt and changelog)
+ if go run release.go; then
+ echo "✅ Release processing complete"
+ else
+ echo "❌ Release processing failed"
+ exit 1
+ fi
+ cd ../..
+ # Read the new version from version.txt
+ NEW_VERSION=$(cat v3/internal/version/version.txt | tr -d '\r\n')
+ if [ -z "$NEW_VERSION" ]; then
+ echo "❌ Could not read new version from v3/internal/version/version.txt"
+ exit 1
+ fi
+ # Ensure tag starts with 'v'
+ case "$NEW_VERSION" in
+ v*) NEW_TAG="$NEW_VERSION" ;;
+ *) NEW_TAG="v$NEW_VERSION" ;;
+ esac
+ echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
+ echo "tag=$NEW_TAG" >> $GITHUB_OUTPUT
+ # Nightly v3-alpha are prereleases
+ echo "is_prerelease=true" >> $GITHUB_OUTPUT
+ echo "is_latest=false" >> $GITHUB_OUTPUT
+ echo "version_changed=true" >> $GITHUB_OUTPUT
- - name: Create and push git tag
- id: git_tag
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- steps.check_tag.outputs.has_tag == 'false' &&
- github.event.inputs.dry_run != 'true' &&
- steps.release.outputs.success == 'true' &&
- steps.release.outputs.version_changed == 'true'
- env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
- run: |
- echo "🏷️ Creating and pushing git tag: ${{ steps.release.outputs.tag }}"
-
- # Initialize error tracking
- GIT_ERRORS=""
- GIT_SUCCESS=true
-
- # Create git tag with error handling
- if git tag -a "${{ steps.release.outputs.tag }}" -m "Release ${{ steps.release.outputs.version }}" 2>&1; then
- echo "✅ Successfully created git tag: ${{ steps.release.outputs.tag }}"
- else
- echo "❌ Failed to create git tag"
- GIT_ERRORS="$GIT_ERRORS\n- Failed to create git tag: ${{ steps.release.outputs.tag }}"
- GIT_SUCCESS=false
- fi
-
- # Push tag with retry logic and error handling
- if [ "$GIT_SUCCESS" == "true" ]; then
- RETRY_COUNT=0
- MAX_RETRIES=3
- PUSH_SUCCESS=false
-
- while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$PUSH_SUCCESS" == "false" ]; do
- RETRY_COUNT=$((RETRY_COUNT + 1))
- echo "🔄 Attempting to push tag (attempt $RETRY_COUNT/$MAX_RETRIES)..."
-
- if git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" "${{ steps.release.outputs.tag }}" 2>&1; then
- echo "✅ Successfully pushed git tag to origin"
- PUSH_SUCCESS=true
- else
- echo "❌ Failed to push git tag (attempt $RETRY_COUNT/$MAX_RETRIES)"
- if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
- echo "⏳ Waiting 5 seconds before retry..."
- sleep 5
- fi
- fi
- done
-
- if [ "$PUSH_SUCCESS" == "false" ]; then
- echo "❌ Failed to push git tag after $MAX_RETRIES attempts"
- GIT_ERRORS="$GIT_ERRORS\n- Failed to push git tag after $MAX_RETRIES attempts"
- GIT_SUCCESS=false
- fi
- fi
-
- # Set outputs for later steps
- echo "success=$GIT_SUCCESS" >> $GITHUB_OUTPUT
-
- if [ -n "$GIT_ERRORS" ]; then
- echo "git_tag_errors<> $GITHUB_OUTPUT
- echo -e "$GIT_ERRORS" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- echo "has_git_errors=true" >> $GITHUB_OUTPUT
- else
- echo "has_git_errors=false" >> $GITHUB_OUTPUT
- fi
+ - name: Commit updated version and changelog
+ env:
+ GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN }}
+ run: |
+ echo "📝 Committing updated version and changelog to v3-alpha"
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git add v3/internal/version/version.txt v3/docs/src/content/docs/changelog.mdx v3/UNRELEASED_CHANGELOG.md || true
+ if git diff --cached --quiet; then
+ echo "No changes to commit"
+ else
+ git commit -m "chore(v3): bump to ${{ steps.process_release.outputs.version }} and update changelog [skip ci]"
+ git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" HEAD:v3-alpha
+ fi
- - name: Commit and push changes
- id: git_commit
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- github.event.inputs.dry_run != 'true' &&
- steps.release.outputs.success == 'true' &&
- steps.release.outputs.version_changed == 'true'
- env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
- run: |
- echo "📝 Committing and pushing changes..."
+ - name: Create and push Git tag
+ if: >-
+ steps.process_release.outputs.version_changed == 'true'
+ env:
+ GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN }}
+ run: |
+ echo "🏷️ Creating and pushing git tag: ${{ steps.process_release.outputs.tag }}"
+
+ # Try pushing the tag with debugging and error capture
+ PUSH_SUCCESS=false
+ PUSH_OUTPUT=$(cat << 'EOF'
+ $(
+ git tag -f "${{ steps.process_release.outputs.tag }}" &&
+ if git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" "${{ steps.process_release.outputs.tag }}" 2>&1; then
+ echo "SUCCESS"
+ else
+ echo "FAILURE"
+ fi)
+ EOF
+ )
+
+ if echo "$PUSH_OUTPUT" | grep -q "SUCCESS"; then
+ echo "✅ Successfully pushed git tag to origin"
+ PUSH_SUCCESS=true
+ else
+ echo "❌ Failed to push tag. Output:"
+ echo "$PUSH_OUTPUT"
- # Initialize error tracking
- COMMIT_ERRORS=""
- COMMIT_SUCCESS=true
-
- # Add any changes made by the release script with error handling
- if git add . 2>&1; then
- echo "✅ Successfully staged changes"
+ # Check if tag already exists on remote
+ echo "Checking if tag already exists on remote..."
+ if git ls-remote --tags origin | grep -q "refs/tags/${{ steps.process_release.outputs.tag }}$"; then
+ echo "ℹ️ Tag already exists on remote, treating as success"
+ PUSH_SUCCESS=true
else
- echo "❌ Failed to stage changes"
- COMMIT_ERRORS="$COMMIT_ERRORS\n- Failed to stage changes with git add"
- COMMIT_SUCCESS=false
- fi
-
- # Check if there are changes to commit
- if [ "$COMMIT_SUCCESS" == "true" ]; then
- if ! git diff --cached --quiet; then
- echo "📝 Changes detected, creating commit..."
-
- # Create commit with error handling
- if git commit -m "${{ steps.release.outputs.version }}" 2>&1; then
- echo "✅ Successfully created commit"
-
- # Push changes with retry logic
- RETRY_COUNT=0
- MAX_RETRIES=3
- PUSH_SUCCESS=false
-
- while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$PUSH_SUCCESS" == "false" ]; do
- RETRY_COUNT=$((RETRY_COUNT + 1))
- echo "🔄 Attempting to push changes (attempt $RETRY_COUNT/$MAX_RETRIES)..."
-
- if git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" v3-alpha 2>&1; then
- echo "✅ Successfully pushed changes to v3-alpha branch"
- PUSH_SUCCESS=true
- else
- echo "❌ Failed to push changes (attempt $RETRY_COUNT/$MAX_RETRIES)"
- if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
- echo "⏳ Waiting 5 seconds before retry..."
- sleep 5
- fi
- fi
- done
-
- if [ "$PUSH_SUCCESS" == "false" ]; then
- echo "❌ Failed to push changes after $MAX_RETRIES attempts"
- COMMIT_ERRORS="$COMMIT_ERRORS\n- Failed to push changes after $MAX_RETRIES attempts"
- COMMIT_SUCCESS=false
- fi
- else
- echo "❌ Failed to create commit"
- COMMIT_ERRORS="$COMMIT_ERRORS\n- Failed to create git commit"
- COMMIT_SUCCESS=false
- fi
- else
- echo "ℹ️ No changes to commit"
- fi
- fi
-
- # Set outputs for later steps
- echo "success=$COMMIT_SUCCESS" >> $GITHUB_OUTPUT
-
- if [ -n "$COMMIT_ERRORS" ]; then
- echo "commit_errors<> $GITHUB_OUTPUT
- echo -e "$COMMIT_ERRORS" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- echo "has_commit_errors=true" >> $GITHUB_OUTPUT
- else
- echo "has_commit_errors=false" >> $GITHUB_OUTPUT
+ echo "❌ Tag does not exist on remote"
fi
+ fi
+
+ if [ "$PUSH_SUCCESS" != "true" ]; then
+ echo "❌ Could not push tag even after retries"
+ exit 1
+ fi
- - name: Read release notes
- id: read_notes
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- steps.release.outputs.release_notes_file != '' &&
- steps.release.outputs.version_changed == 'true'
- run: |
- cd v3
- if [ -f "release-notes.txt" ]; then
- # Read the release notes and add header
- echo "### Changes in this release:" > formatted-release-notes.txt
- echo "" >> formatted-release-notes.txt
- cat release-notes.txt >> formatted-release-notes.txt
-
- # Read the formatted notes for output
- RELEASE_NOTES=$(cat formatted-release-notes.txt)
- echo "release_notes<> $GITHUB_OUTPUT
- echo "$RELEASE_NOTES" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
+ - name: Create GitHub Release
+ if: >-
+ steps.process_release.outputs.version_changed == 'true'
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ run: |
+ echo "🚀 Creating GitHub release for tag: ${{ steps.process_release.outputs.tag }}"
+
+ # Prepare release notes content
+ RELEASE_NOTES_FILE="release_notes.md"
+ if [ -f "$RELEASE_NOTES_FILE" ]; then
+ echo "Using generated release notes from $RELEASE_NOTES_FILE"
+ else
+ echo "No release notes file found, generating basic notes"
+ echo "# Release ${{ steps.release.outputs.version }}" > $RELEASE_NOTES_FILE
+ echo "Generated by nightly release workflow" >> $RELEASE_NOTES_FILE
+ fi
+
+ echo "Creating release via GitHub API..."
+ API_URL="https://api.github.com/repos/${{ github.repository }}/releases"
+ AUTH_HEADER="Authorization: Bearer ${GITHUB_TOKEN}"
+ ACCEPT_HEADER="Accept: application/vnd.github+json"
+ USER_AGENT_HEADER="User-Agent: nightly-release-script"
+
+ # Create GitHub release using gh cli if available, fallback to API
+ if command -v gh >/dev/null 2>&1; then
+ echo "Using gh CLI to create release"
+ if gh release create "${{ steps.process_release.outputs.tag }}" \
+ --title "${{ steps.process_release.outputs.version }}" \
+ --notes-file "$RELEASE_NOTES_FILE" \
+ $([ "${{ steps.process_release.outputs.is_prerelease }}" == "true" ] && echo "--prerelease") \
+ $([ "${{ steps.process_release.outputs.is_latest }}" == "true" ] && echo "--latest"); then
+ echo "✅ GitHub release created successfully using gh CLI"
else
- echo "release_notes=No release notes available" >> $GITHUB_OUTPUT
- fi
-
- - name: Test GitHub Release Creation (DRY RUN)
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- github.event.inputs.dry_run == 'true' &&
- steps.release.outputs.version_changed == 'true'
- run: |
- echo "🧪 DRY RUN: Would create GitHub release with the following parameters:"
- echo "======================================================================="
- echo "Tag Name: ${{ steps.release.outputs.tag }}"
- echo "Release Name: ${{ steps.release.outputs.title }}"
- echo "Is Prerelease: ${{ steps.release.outputs.is_prerelease }}"
- echo "Is Latest: ${{ steps.release.outputs.is_latest }}"
- echo "Has Changes: ${{ steps.release.outputs.has_changes }}"
- echo ""
- echo "Release Body Preview:"
- echo "## Wails v3 Alpha Release - ${{ steps.release.outputs.version }}"
- echo ""
- cat << 'RELEASE_NOTES_EOF'
- ${{ steps.read_notes.outputs.release_notes }}
- RELEASE_NOTES_EOF
- echo ""
- echo ""
- echo ""
- echo "---"
- echo ""
- echo "🤖 This is an automated nightly release generated from the latest changes in the v3-alpha branch."
- echo ""
- echo "**Installation:**"
- echo "\`\`\`bash"
- echo "go install github.com/wailsapp/wails/v3/cmd/wails@${{ steps.release.outputs.tag }}"
- echo "\`\`\`"
- echo ""
- echo "**⚠️ Alpha Warning:** This is pre-release software and may contain bugs or incomplete features."
- echo ""
- echo "✅ DRY RUN: GitHub release creation test completed successfully!"
-
- - name: Create GitHub Release (LIVE)
- id: github_release
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- github.event.inputs.dry_run != 'true' &&
- steps.release.outputs.success == 'true' &&
- steps.release.outputs.version_changed == 'true'
- continue-on-error: true
- run: |
- echo "🚀 Creating GitHub release using gh CLI..."
-
- # Create release notes in a temporary file
- cat > release_notes.md << 'EOF'
- ## Wails v3 Alpha Release - ${{ steps.release.outputs.version }}
-
- ${{ steps.read_notes.outputs.release_notes }}
-
-
-
- ---
-
- 🤖 This is an automated nightly release generated from the latest changes in the v3-alpha branch.
-
- **Installation:**
- ```bash
- go install github.com/wailsapp/wails/v3/cmd/wails@${{ steps.release.outputs.tag }}
- ```
-
- **⚠️ Alpha Warning:** This is pre-release software and may contain bugs or incomplete features.
- EOF
-
- # Create the release
- if gh release create "${{ steps.release.outputs.tag }}" \
- --title "${{ steps.release.outputs.title }}" \
- --notes-file release_notes.md \
- --target v3-alpha \
- --prerelease; then
- echo "✅ Successfully created GitHub release"
- echo "outcome=success" >> $GITHUB_OUTPUT
- else
- echo "❌ Failed to create GitHub release"
- echo "outcome=failure" >> $GITHUB_OUTPUT
- fi
- env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
-
- - name: Handle GitHub Release Creation Result
- id: release_result
- if: |
- (steps.quick_check.outputs.should_continue == 'true' || github.event.inputs.force_release == 'true') &&
- github.event.inputs.dry_run != 'true' &&
- steps.release.outputs.success == 'true' &&
- steps.release.outputs.version_changed == 'true'
- run: |
- echo "📋 Checking GitHub release creation result..."
-
- # Initialize error tracking
- GITHUB_ERRORS=""
- GITHUB_SUCCESS=true
-
- # Check if GitHub release creation succeeded
- if [ "${{ steps.github_release.outcome }}" == "success" ]; then
- echo "✅ GitHub release created successfully"
- echo "🔗 Release URL: https://github.com/${{ github.repository }}/releases/tag/${{ steps.release.outputs.tag }}"
- else
- echo "❌ GitHub release creation failed"
- GITHUB_ERRORS="$GITHUB_ERRORS\n- GitHub release creation failed with outcome: ${{ steps.github_release.outcome }}"
- GITHUB_SUCCESS=false
- fi
-
- # Set outputs for summary
- echo "success=$GITHUB_SUCCESS" >> $GITHUB_OUTPUT
-
- if [ -n "$GITHUB_ERRORS" ]; then
- echo "github_errors<> $GITHUB_OUTPUT
- echo -e "$GITHUB_ERRORS" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- echo "has_github_errors=true" >> $GITHUB_OUTPUT
- else
- echo "has_github_errors=false" >> $GITHUB_OUTPUT
- fi
-
- - name: Error Summary and Reporting
- id: error_summary
- if: always()
- run: |
- echo "📊 Generating comprehensive error summary..."
-
- # Initialize error tracking
- TOTAL_ERRORS=0
- ERROR_SUMMARY=""
- OVERALL_SUCCESS=true
-
- # Check for changelog errors
- if [ "${{ steps.changelog_check.outputs.has_errors }}" == "true" ]; then
- echo "❌ Changelog processing errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 📄 Changelog Processing Errors\n${{ steps.changelog_check.outputs.changelog_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for release script errors
- if [ "${{ steps.release.outputs.has_release_errors }}" == "true" ]; then
- echo "❌ Release script errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 🚀 Release Script Errors\n${{ steps.release.outputs.release_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for git tag errors
- if [ "${{ steps.git_tag.outputs.has_git_errors }}" == "true" ]; then
- echo "❌ Git tag errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 🏷️ Git Tag Errors\n${{ steps.git_tag.outputs.git_tag_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for git commit errors
- if [ "${{ steps.git_commit.outputs.has_commit_errors }}" == "true" ]; then
- echo "❌ Git commit errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 📝 Git Commit Errors\n${{ steps.git_commit.outputs.commit_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for GitHub release errors
- if [ "${{ steps.release_result.outputs.has_github_errors }}" == "true" ]; then
- echo "❌ GitHub release errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 🐙 GitHub Release Errors\n${{ steps.release_result.outputs.github_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Set outputs for final summary
- echo "total_errors=$TOTAL_ERRORS" >> $GITHUB_OUTPUT
- echo "overall_success=$OVERALL_SUCCESS" >> $GITHUB_OUTPUT
-
- if [ -n "$ERROR_SUMMARY" ]; then
- echo "error_summary<> $GITHUB_OUTPUT
- echo -e "$ERROR_SUMMARY" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- fi
-
- # Log summary
- if [ "$OVERALL_SUCCESS" == "true" ]; then
- echo "✅ Workflow completed successfully with no errors"
- else
- echo "⚠️ Workflow completed with $TOTAL_ERRORS error categories"
- fi
-
- - name: Summary
- if: always()
- run: |
- if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
- echo "## 🧪 DRY RUN Release Test Summary" >> $GITHUB_STEP_SUMMARY
- else
- echo "## 🚀 Nightly Release Summary" >> $GITHUB_STEP_SUMMARY
- fi
- echo "================================" >> $GITHUB_STEP_SUMMARY
- echo "- **Version:** ${{ steps.release.outputs.version }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Tag:** ${{ steps.release.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Version Changed:** ${{ steps.release.outputs.version_changed }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Has existing tag:** ${{ steps.check_tag.outputs.has_tag }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Has unreleased changelog content:** ${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Has changes:** ${{ steps.release.outputs.has_changes }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Is prerelease:** ${{ steps.release.outputs.is_prerelease }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Is latest:** ${{ steps.release.outputs.is_latest }}" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
-
- # Overall status
- if [ "${{ steps.error_summary.outputs.overall_success }}" == "true" ]; then
- if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
- echo "- **Mode:** 🧪 DRY RUN (no actual release created)" >> $GITHUB_STEP_SUMMARY
- echo "- **Status:** ✅ Test completed successfully" >> $GITHUB_STEP_SUMMARY
- else
- echo "- **Mode:** 🚀 Live release" >> $GITHUB_STEP_SUMMARY
- echo "- **Status:** ✅ Release created successfully" >> $GITHUB_STEP_SUMMARY
- fi
- else
- echo "- **Mode:** ${{ github.event.inputs.dry_run == 'true' && '🧪 DRY RUN' || '🚀 Live release' }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Status:** ⚠️ Completed with ${{ steps.error_summary.outputs.total_errors }} error(s)" >> $GITHUB_STEP_SUMMARY
- fi
-
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### Release Processing" >> $GITHUB_STEP_SUMMARY
- if [ "${{ steps.release.outputs.version_changed }}" == "true" ]; then
- echo "✅ **Version was incremented** and release created" >> $GITHUB_STEP_SUMMARY
- else
- echo "ℹ️ **Version was not changed** - no release created" >> $GITHUB_STEP_SUMMARY
- fi
-
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### Changelog Processing" >> $GITHUB_STEP_SUMMARY
- if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
- echo "✅ **UNRELEASED_CHANGELOG.md** had content and was processed" >> $GITHUB_STEP_SUMMARY
- echo "- Content moved to main changelog" >> $GITHUB_STEP_SUMMARY
- echo "- UNRELEASED_CHANGELOG.md reset with template" >> $GITHUB_STEP_SUMMARY
- else
- echo "ℹ️ **UNRELEASED_CHANGELOG.md** had no content to process" >> $GITHUB_STEP_SUMMARY
- fi
-
- # Error reporting section
- if [ "${{ steps.error_summary.outputs.total_errors }}" -gt 0 ]; then
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "## ⚠️ Error Report" >> $GITHUB_STEP_SUMMARY
- echo "**Total Error Categories:** ${{ steps.error_summary.outputs.total_errors }}" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "${{ steps.error_summary.outputs.error_summary }}" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### 🔧 Troubleshooting Tips" >> $GITHUB_STEP_SUMMARY
- echo "- Check the individual step logs above for detailed error messages" >> $GITHUB_STEP_SUMMARY
- echo "- Verify GitHub token permissions (contents: write, pull-requests: read)" >> $GITHUB_STEP_SUMMARY
- echo "- Ensure UNRELEASED_CHANGELOG.md follows the expected format" >> $GITHUB_STEP_SUMMARY
- echo "- Check for network connectivity issues if git/GitHub operations failed" >> $GITHUB_STEP_SUMMARY
- echo "- Re-run the workflow with 'force_release=true' if needed" >> $GITHUB_STEP_SUMMARY
- fi
-
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### Release Notes Preview" >> $GITHUB_STEP_SUMMARY
- if [ -n "${{ steps.read_notes.outputs.release_notes }}" ]; then
- echo "${{ steps.read_notes.outputs.release_notes }}" >> $GITHUB_STEP_SUMMARY
- else
- echo "No specific release notes generated" >> $GITHUB_STEP_SUMMARY
- fi
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "---" >> $GITHUB_STEP_SUMMARY
- echo "*Generated by automated nightly release workflow with enhanced error handling and changelog integration*" >> $GITHUB_STEP_SUMMARY
-
- # Set final workflow status
- if [ "${{ steps.error_summary.outputs.overall_success }}" != "true" ]; then
- echo "⚠️ Workflow completed with errors. Check the summary above for details."
+ echo "❌ Failed to create GitHub release using gh CLI"
exit 1
- fi
\ No newline at end of file
+ fi
+ else
+ echo "gh CLI not available, using GitHub API"
+
+ RELEASE_DATA=$(jq -n \
+ --arg tag_name "${{ steps.process_release.outputs.tag }}" \
+ --arg name "${{ steps.process_release.outputs.version }}" \
+ --arg body "$(cat "$RELEASE_NOTES_FILE" | sed 's/"/\\"/g')" \
+ --argjson prerelease $([ "${{ steps.process_release.outputs.is_prerelease }}" == "true" ] && echo true || echo false) \
+ --argjson make_latest $([ "${{ steps.process_release.outputs.is_latest }}" == "true" ] && echo true || echo false) \
+ '{ tag_name: $tag_name, name: $name, body: $body, prerelease: $prerelease, make_latest: $make_latest }')
+
+ echo "Release data payload:"
+ echo "$RELEASE_DATA" | jq '.'
+
+ RESPONSE=$(curl -sS -X POST -H "$AUTH_HEADER" -H "$ACCEPT_HEADER" -H "$USER_AGENT_HEADER" -d "$RELEASE_DATA" "$API_URL")
+ echo "GitHub API response:"
+ echo "$RESPONSE" | jq '.'
+
+ if echo "$RESPONSE" | jq -e '.id' >/dev/null; then
+ echo "✅ GitHub release created successfully via API"
+ else
+ echo "❌ Failed to create GitHub release via API"
+ exit 1
+ fi
+ fi
+
+ - name: Read generated release notes
+ id: read_notes
+ if: >-
+ steps.process_release.outputs.version_changed == 'true'
+ run: |
+ if [ -f "release_notes.md" ]; then
+ echo "Reading release notes content..."
+ echo "release_notes<> $GITHUB_OUTPUT
+ cat release_notes.md >> $GITHUB_OUTPUT
+ echo "EOF" >> $GITHUB_OUTPUT
+ else
+ echo "No release notes file found"
+ echo "release_notes=" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Handle GitHub Release Creation Result
+ id: release_result
+ if: >-
+ steps.process_release.outputs.version_changed == 'true'
+ run: |
+ echo "🔍 Checking release result..."
+
+ # Initialize variables
+ HAS_GITHUB_ERRORS=false
+ GITHUB_ERRORS=""
+
+ # Check if we can access the release via API
+ if command -v gh >/dev/null 2>&1; then
+ echo "Checking release via gh CLI..."
+ if gh release view "${{ steps.release.outputs.tag }}" >/dev/null 2>&1; then
+ echo "✅ Release is accessible via gh CLI"
+ else
+ echo "⚠️ Release not accessible via gh CLI"
+ HAS_GITHUB_ERRORS=true
+ GITHUB_ERRORS="$GITHUB_ERRORS\n- Release not accessible via gh CLI"
+ fi
+ else
+ echo "gh CLI not available, skipping CLI checks"
+ fi
+
+ echo "has_github_errors=$HAS_GITHUB_ERRORS" >> $GITHUB_OUTPUT
+ if [ -n "$GITHUB_ERRORS" ]; then
+ echo "github_errors=$GITHUB_ERRORS" >> $GITHUB_OUTPUT
+ else
+ echo "github_errors=" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Error Summary and Reporting
+ id: error_summary
+ if: always()
+ run: |
+ echo "🧮 Generating comprehensive error summary..."
+
+ # Initialize error tracking
+ TOTAL_ERRORS=0
+ ERROR_SUMMARY=""
+ OVERALL_SUCCESS=true
+
+ # Check for changelog errors
+ if [ "${{ steps.changelog_check.outputs.has_errors }}" == "true" ]; then
+ echo "❌ Changelog processing errors detected"
+ ERROR_SUMMARY="$ERROR_SUMMARY\n### 📄 Changelog Processing Errors\n${{ steps.changelog_check.outputs.changelog_errors }}\n"
+ TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
+ OVERALL_SUCCESS=false
+ fi
+
+ # Check for release script errors
+ if [ "${{ steps.release.outputs.has_release_errors }}" == "true" ]; then
+ echo "❌ Release script errors detected"
+ ERROR_SUMMARY="$ERROR_SUMMARY\n### 🚀 Release Script Errors\n${{ steps.release.outputs.release_errors }}\n"
+ TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
+ OVERALL_SUCCESS=false
+ fi
+
+ # Check for GitHub release errors
+ if [ "${{ steps.release_result.outputs.has_github_errors }}" == "true" ]; then
+ echo "❌ GitHub release errors detected"
+ ERROR_SUMMARY="$ERROR_SUMMARY\n### 🐙 GitHub Release Errors\n${{ steps.release_result.outputs.github_errors }}\n"
+ TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
+ OVERALL_SUCCESS=false
+ fi
+
+ # Set outputs for final summary
+ echo "total_errors=$TOTAL_ERRORS" >> $GITHUB_OUTPUT
+ echo "overall_success=$OVERALL_SUCCESS" >> $GITHUB_OUTPUT
+
+ if [ -n "$ERROR_SUMMARY" ]; then
+ echo "error_summary<> $GITHUB_OUTPUT
+ echo -e "$ERROR_SUMMARY" >> $GITHUB_OUTPUT
+ echo "EOF" >> $GITHUB_OUTPUT
+ fi
+
+ # Log summary
+ if [ "$OVERALL_SUCCESS" == "true" ]; then
+ echo "✅ Workflow completed successfully with no errors"
+ else
+ echo "⚠️ Workflow completed with $TOTAL_ERRORS error categories"
+ fi
+
+ - name: Summary
+ if: always()
+ run: |
+ if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
+ echo "## 🧪 DRY RUN Release Test Summary" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "## 🚀 Nightly Release Summary" >> $GITHUB_STEP_SUMMARY
+ fi
+ echo "================================" >> $GITHUB_STEP_SUMMARY
+ echo "- **Version:** ${{ steps.process_release.outputs.version }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Tag:** ${{ steps.process_release.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Version Changed:** ${{ steps.process_release.outputs.version_changed }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Has existing tag:** ${{ steps.check_tag.outputs.has_tag }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Has unreleased changelog content:** ${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Has changes:** true" >> $GITHUB_STEP_SUMMARY
+ echo "- **Is prerelease:** ${{ steps.process_release.outputs.is_prerelease }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Is latest:** ${{ steps.process_release.outputs.is_latest }}" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+
+ # Overall status
+ if [ "${{ steps.error_summary.outputs.overall_success }}" == "true" ]; then
+ if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
+ echo "- **Mode:** 🧪 DRY RUN (no actual release created)" >> $GITHUB_STEP_SUMMARY
+ echo "- **Status:** ✅ Test completed successfully" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "- **Mode:** 🚀 Live release" >> $GITHUB_STEP_SUMMARY
+ echo "- **Status:** ✅ Release created successfully" >> $GITHUB_STEP_SUMMARY
+ fi
+ else
+ echo "- **Mode:** ${{ github.event.inputs.dry_run == 'true' && '🧪 DRY RUN' || '🚀 Live release' }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Status:** ⚠️ Completed with ${{ steps.error_summary.outputs.total_errors }} error(s)" >> $GITHUB_STEP_SUMMARY
+ fi
+
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### Release Processing" >> $GITHUB_STEP_SUMMARY
+ if [ "${{ steps.process_release.outputs.version_changed }}" == "true" ]; then
+ echo "✅ **Version was incremented** and release created" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "ℹ️ **Version was not changed** - no release created" >> $GITHUB_STEP_SUMMARY
+ fi
+
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### Changelog Processing" >> $GITHUB_STEP_SUMMARY
+ if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
+ echo "✅ **UNRELEASED_CHANGELOG.md** had content and was processed" >> $GITHUB_STEP_SUMMARY
+ echo "- Content moved to main changelog" >> $GITHUB_STEP_SUMMARY
+ echo "- UNRELEASED_CHANGELOG.md reset with template" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "ℹ️ **UNRELEASED_CHANGELOG.md** had no content to process" >> $GITHUB_STEP_SUMMARY
+ fi
+
+ # Error reporting section
+ if [ "${{ steps.error_summary.outputs.total_errors }}" -gt 0 ]; then
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "## ⚠️ Error Report" >> $GITHUB_STEP_SUMMARY
+ echo "**Total Error Categories:** ${{ steps.error_summary.outputs.total_errors }}" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "${{ steps.error_summary.outputs.error_summary }}" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### 🔧 Troubleshooting Tips" >> $GITHUB_STEP_SUMMARY
+ echo "- Check the individual step logs above for detailed error messages" >> $GITHUB_STEP_SUMMARY
+ echo "- Verify GitHub token permissions (contents: write, pull-requests: read)" >> $GITHUB_STEP_SUMMARY
+ echo "- Ensure UNRELEASED_CHANGELOG.md follows the expected format" >> $GITHUB_STEP_SUMMARY
+ echo "- Check for network connectivity issues if git/GitHub operations failed" >> $GITHUB_STEP_SUMMARY
+ echo "- Re-run the workflow with 'force_release=true' if needed" >> $GITHUB_STEP_SUMMARY
+ fi
+
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### Release Notes Preview" >> $GITHUB_STEP_SUMMARY
+ if [ -n "${{ steps.read_notes.outputs.release_notes }}" ]; then
+ echo "${{ steps.read_notes.outputs.release_notes }}" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "No specific release notes generated" >> $GITHUB_STEP_SUMMARY
+ fi
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "---" >> $GITHUB_STEP_SUMMARY
+ echo "*Generated by automated nightly release workflow with enhanced error handling and changelog integration*" >> $GITHUB_STEP_SUMMARY
+
+ # Set final workflow status
+ if [ "${{ steps.error_summary.outputs.overall_success }}" != "true" ]; then
+ echo "⚠️ Workflow completed with errors. Check the summary above for details."
+ exit 1
+ fi
From dfff54900253dae0c55a260890506e98a81f11a2 Mon Sep 17 00:00:00 2001
From: Anshuman <43794060+ansxuman@users.noreply.github.com>
Date: Wed, 24 Sep 2025 01:44:58 -0400
Subject: [PATCH 12/99] Prevent DLL hijacking by setting default DLL
directories on initialization (#4207)
* Prevent DLL hijacking by setting default DLL directories on initialization
* Updated the changelog
* Added DLLSearchPaths option to control DLL search paths on Windows
* Changed the order of the execution for uxtheme.go and consts.go
* Init uxtheme.go and consts.go once the dll path is set
---------
Co-authored-by: Lea Anthony
---
.../frontend/desktop/windows/frontend.go | 9 ++++++
.../desktop/windows/winc/w32/uxtheme.go | 2 +-
v2/internal/platform/win32/consts.go | 2 +-
v2/pkg/options/windows/windows.go | 30 +++++++++++++++++++
website/src/pages/changelog.mdx | 1 +
5 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/v2/internal/frontend/desktop/windows/frontend.go b/v2/internal/frontend/desktop/windows/frontend.go
index a29eb851b..5df13ed98 100644
--- a/v2/internal/frontend/desktop/windows/frontend.go
+++ b/v2/internal/frontend/desktop/windows/frontend.go
@@ -28,11 +28,13 @@ import (
"github.com/wailsapp/wails/v2/internal/frontend/originvalidator"
wailsruntime "github.com/wailsapp/wails/v2/internal/frontend/runtime"
"github.com/wailsapp/wails/v2/internal/logger"
+ w32consts "github.com/wailsapp/wails/v2/internal/platform/win32"
"github.com/wailsapp/wails/v2/internal/system/operatingsystem"
"github.com/wailsapp/wails/v2/pkg/assetserver"
"github.com/wailsapp/wails/v2/pkg/assetserver/webview"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/windows"
+ w "golang.org/x/sys/windows"
)
const startURL = "http://wails.localhost/"
@@ -75,6 +77,13 @@ func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.
// Get Windows build number
versionInfo, _ := operatingsystem.GetWindowsVersionInfo()
+ // Apply DLL search path settings if specified
+ if appoptions.Windows != nil && appoptions.Windows.DLLSearchPaths != 0 {
+ w.SetDefaultDllDirectories(appoptions.Windows.DLLSearchPaths)
+ }
+ // Now initialize packages that load DLLs
+ w32.Init()
+ w32consts.Init()
result := &Frontend{
frontendOptions: appoptions,
logger: myLogger,
diff --git a/v2/internal/frontend/desktop/windows/winc/w32/uxtheme.go b/v2/internal/frontend/desktop/windows/winc/w32/uxtheme.go
index ed80d487f..8a14f0cb7 100644
--- a/v2/internal/frontend/desktop/windows/winc/w32/uxtheme.go
+++ b/v2/internal/frontend/desktop/windows/winc/w32/uxtheme.go
@@ -69,7 +69,7 @@ var (
setWindowTheme uintptr
)
-func init() {
+func Init() {
// Library
libuxtheme = MustLoadLibrary("uxtheme.dll")
diff --git a/v2/internal/platform/win32/consts.go b/v2/internal/platform/win32/consts.go
index 03f42b1a6..43149b036 100644
--- a/v2/internal/platform/win32/consts.go
+++ b/v2/internal/platform/win32/consts.go
@@ -80,7 +80,7 @@ ShouldSystemUseDarkMode = bool () // ordinal 138
SetPreferredAppMode = PreferredAppMode (PreferredAppMode appMode) // ordinal 135, since 18334
IsDarkModeAllowedForApp = bool () // ordinal 139
*/
-func init() {
+func Init() {
if IsWindowsVersionAtLeast(10, 0, 18334) {
// AllowDarkModeForWindow is only available on Windows 10+
diff --git a/v2/pkg/options/windows/windows.go b/v2/pkg/options/windows/windows.go
index aa065ecd9..d2176f09a 100644
--- a/v2/pkg/options/windows/windows.go
+++ b/v2/pkg/options/windows/windows.go
@@ -1,5 +1,9 @@
package windows
+import (
+ "golang.org/x/sys/windows"
+)
+
type Theme int
type Messages struct {
@@ -35,6 +39,27 @@ const (
Tabbed BackdropType = 4
)
+const (
+ // Default is 0, which means no changes to the default Windows DLL search behavior
+ DLLSearchDefault uint32 = 0
+ // LoadLibrary flags for determining from where to search for a DLL
+ DLLSearchDontResolveDllReferences uint32 = windows.DONT_RESOLVE_DLL_REFERENCES // 0x1
+ DLLSearchAsDataFile uint32 = windows.LOAD_LIBRARY_AS_DATAFILE // 0x2
+ DLLSearchWithAlteredPath uint32 = windows.LOAD_WITH_ALTERED_SEARCH_PATH // 0x8
+ DLLSearchIgnoreCodeAuthzLevel uint32 = windows.LOAD_IGNORE_CODE_AUTHZ_LEVEL // 0x10
+ DLLSearchAsImageResource uint32 = windows.LOAD_LIBRARY_AS_IMAGE_RESOURCE // 0x20
+ DLLSearchAsDataFileExclusive uint32 = windows.LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE // 0x40
+ DLLSearchRequireSignedTarget uint32 = windows.LOAD_LIBRARY_REQUIRE_SIGNED_TARGET // 0x80
+ DLLSearchDllLoadDir uint32 = windows.LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR // 0x100
+ DLLSearchApplicationDir uint32 = windows.LOAD_LIBRARY_SEARCH_APPLICATION_DIR // 0x200
+ DLLSearchUserDirs uint32 = windows.LOAD_LIBRARY_SEARCH_USER_DIRS // 0x400
+ DLLSearchSystem32 uint32 = windows.LOAD_LIBRARY_SEARCH_SYSTEM32 // 0x800
+ DLLSearchDefaultDirs uint32 = windows.LOAD_LIBRARY_SEARCH_DEFAULT_DIRS // 0x1000
+ DLLSearchSafeCurrentDirs uint32 = windows.LOAD_LIBRARY_SAFE_CURRENT_DIRS // 0x2000
+ DLLSearchSystem32NoForwarder uint32 = windows.LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER // 0x4000
+ DLLSearchOsIntegrityContinuity uint32 = windows.LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY // 0x8000
+)
+
func RGB(r, g, b uint8) int32 {
col := int32(b)
col = col<<8 | int32(g)
@@ -122,6 +147,11 @@ type Options struct {
// Class name for the window. If empty, 'wailsWindow' will be used.
WindowClassName string
+
+ // DLLSearchPaths controls which directories are searched when loading DLLs
+ // Set to 0 for default behavior, or combine multiple flags with bitwise OR
+ // Example: DLLSearchApplicationDir | DLLSearchSystem32
+ DLLSearchPaths uint32
}
func DefaultMessages() *Messages {
diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx
index 08bbf4f7f..30a50c16b 100644
--- a/website/src/pages/changelog.mdx
+++ b/website/src/pages/changelog.mdx
@@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated documentation to display the correct copyright year in [#4243](https://github.com/wailsapp/wails/pull/4243) by [@nnashwin](https://github.com/nnashwin)
### Added
+- Added DLLSearchPaths option to control DLL search paths on Windows in [#4207](https://github.com/wailsapp/wails/pull/4207) by @ansxuman
- Added "Branding" section to `wails doctor` to correctly identify Windows 11 [#3891](https://github.com/wailsapp/wails/pull/3891) by [@ronen25](https://github.com/ronen25)
- Added `-skipembedcreate` flag to build and dev command to improve compile and recompile speed [#4143](https://github.com/wailsapp/wails/pull/4143) by @josStorer
- Added `DisablePanicRecovery` option to allow handle panics manually [#4136](https://github.com/wailsapp/wails/pull/4136) by [@APshenkin](https://github.com/APshenkin)
From 5ee47ccf7b13f6f390f4010df32d6f669b6739ca Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 25 Sep 2025 12:23:08 +1000
Subject: [PATCH 13/99] chore: update sponsors.svg (#4577)
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
---
website/static/img/sponsors.svg | 258 ++++++++++++++++----------------
1 file changed, 125 insertions(+), 133 deletions(-)
diff --git a/website/static/img/sponsors.svg b/website/static/img/sponsors.svg
index 49933a096..8364130a8 100644
--- a/website/static/img/sponsors.svg
+++ b/website/static/img/sponsors.svg
@@ -1,4 +1,4 @@
-
+
-
-
-
+
-
+
From 909c16c517a8600c7daca5ab0c0f58c13e72bc62 Mon Sep 17 00:00:00 2001
From: Lea Anthony
Date: Thu, 25 Sep 2025 14:20:20 +1000
Subject: [PATCH 14/99] Update nightly release script
---
.github/workflows/nightly-release-v3.yml | 522 ++++-------------------
v2/examples/customlayout/go.mod | 2 +-
v2/examples/customlayout/go.sum | 1 +
3 files changed, 85 insertions(+), 440 deletions(-)
diff --git a/.github/workflows/nightly-release-v3.yml b/.github/workflows/nightly-release-v3.yml
index 426e45589..ae56ba7bc 100644
--- a/.github/workflows/nightly-release-v3.yml
+++ b/.github/workflows/nightly-release-v3.yml
@@ -1,4 +1,3 @@
-
name: Nightly Release v3-alpha
on:
@@ -32,33 +31,20 @@ jobs:
with:
ref: v3-alpha
fetch-depth: 0
- token: ${{ github.token }}
+ token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
- name: Setup Go
- uses: actions/setup-go@v5
+ uses: actions/setup-go@v4
with:
- go-version: '1.23'
+ go-version: '1.24'
+ cache: true
cache-dependency-path: 'v3/go.sum'
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
- repo-token: ${{ github.token }}
-
- - name: Verify Go and Task installation
- run: |
- echo "Go version:"
- go version
- echo ""
- echo "Task version:"
- task --version
- echo ""
- echo "Working directory:"
- pwd
- echo ""
- echo "v3 directory contents:"
- ls -la v3/
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Git
run: |
@@ -66,7 +52,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Configure git to use the token for authentication
- git config --global url."https://x-access-token:${{ github.token }}@github.com/".insteadOf "https://github.com/"
+ git config --global url."https://x-access-token:${{ secrets.WAILS_REPO_TOKEN || github.token }}@github.com/".insteadOf "https://github.com/"
- name: Check for existing release tag
id: check_tag
@@ -84,24 +70,16 @@ jobs:
run: |
echo "🔍 Checking UNRELEASED_CHANGELOG.md for content..."
- # Check if the file exists and has content
- if [ -f "v3/UNRELEASED_CHANGELOG.md" ]; then
- echo "Found v3/UNRELEASED_CHANGELOG.md"
-
- # Run the release script in check mode to see if there's content
- cd v3/tasks/release
-
- # Use the release script itself to check for content
- if go run release.go --check-only 2>/dev/null; then
- echo "has_unreleased_content=true" >> $GITHUB_OUTPUT
- echo "✅ Found unreleased changelog content"
- else
- echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
- echo "ℹ️ No unreleased changelog content found"
- fi
+ # Run the release script in check mode to see if there's content
+ cd v3/tasks/release
+
+ # Use the release script itself to check for content
+ if go run release.go --check-only 2>/dev/null; then
+ echo "has_unreleased_content=true" >> $GITHUB_OUTPUT
+ echo "✅ Found unreleased changelog content"
else
- echo "⚠️ v3/UNRELEASED_CHANGELOG.md not found"
echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
+ echo "ℹ️ No unreleased changelog content found"
fi
- name: Quick change detection and early exit
@@ -126,441 +104,107 @@ jobs:
CURRENT_TAG=$(git describe --tags --exact-match HEAD)
echo "Current commit has release tag: $CURRENT_TAG"
- # Get the tag creation date
- TAG_DATE=$(git log -1 --format=%aI "$CURRENT_TAG")
- if [ -z "$TAG_DATE" ]; then
- echo "Failed to obtain tag date, proceeding with conservative fallback"
- TAG_DATE="1970-01-01T00:00:00Z"
- fi
- echo "Tag date: $TAG_DATE"
-
- # Compare this commit date with tag date
- COMMIT_DATE=$(git log -1 --format=%aI HEAD)
- echo "Commit date: $COMMIT_DATE"
-
- # If the commit is newer than the tag, then it means there are changes
- if [ "$COMMIT_DATE" \> "$TAG_DATE" ]; then
- echo "Commit is newer than the tag. Proceeding with release."
- echo "has_changes=true" >> $GITHUB_OUTPUT
- echo "should_continue=true" >> $GITHUB_OUTPUT
- echo "reason=Commit newer than tag" >> $GITHUB_OUTPUT
- else
- echo "Commit is the same as the tag. No new changes."
+ # For tagged commits, check if there are changes since the tag
+ COMMIT_COUNT=$(git rev-list ${CURRENT_TAG}..HEAD --count)
+ if [ "$COMMIT_COUNT" -eq 0 ]; then
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "should_continue=false" >> $GITHUB_OUTPUT
echo "reason=No changes since existing tag $CURRENT_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
+ else
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "should_continue=true" >> $GITHUB_OUTPUT
fi
- exit 0
- fi
-
- echo "Checking against the latest existing release tag..."
-
- # Find the latest release tag matching v3-alpha
- LATEST_TAG=$(git tag --list 'v3.0.0-alpha.*' --sort=-v:refname | head -n 1)
- echo "Latest tag: $LATEST_TAG"
-
- if [ -z "$LATEST_TAG" ]; then
- echo "No previous release found, proceeding with release"
- echo "has_changes=true" >> $GITHUB_OUTPUT
- echo "should_continue=true" >> $GITHUB_OUTPUT
- echo "reason=No previous tag found" >> $GITHUB_OUTPUT
- exit 0
- fi
-
- # Compare against the latest release tag
- if git diff --quiet "$LATEST_TAG"..HEAD -- v3; then
- echo "No changes detected since latest release $LATEST_TAG and no unreleased changelog content"
- echo "has_changes=false" >> $GITHUB_OUTPUT
- echo "should_continue=false" >> $GITHUB_OUTPUT
- echo "reason=No changes since latest release $LATEST_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
else
- echo "Changes detected since latest release $LATEST_TAG"
- echo "has_changes=true" >> $GITHUB_OUTPUT
- echo "should_continue=true" >> $GITHUB_OUTPUT
- echo "reason=Changes detected since latest release $LATEST_TAG" >> $GITHUB_OUTPUT
+ # No current tag, check against latest release
+ LATEST_TAG=$(git tag --list "v3.0.0-alpha.*" | sort -V | tail -1)
+ if [ -z "$LATEST_TAG" ]; then
+ echo "No previous release found, proceeding with release"
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "should_continue=true" >> $GITHUB_OUTPUT
+ else
+ COMMIT_COUNT=$(git rev-list ${LATEST_TAG}..HEAD --count)
+ if [ "$COMMIT_COUNT" -gt 0 ]; then
+ echo "Found $COMMIT_COUNT commits since $LATEST_TAG"
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "should_continue=true" >> $GITHUB_OUTPUT
+ else
+ echo "has_changes=false" >> $GITHUB_OUTPUT
+ echo "should_continue=false" >> $GITHUB_OUTPUT
+ echo "reason=No changes since latest release $LATEST_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
+ fi
+ fi
fi
-
- - name: Early exit if no changes and not forced
- if: >-
- steps.quick_check.outputs.should_continue == 'false' &&
+
+ - name: Early exit - No changes detected
+ if: |
+ steps.quick_check.outputs.should_continue == 'false' &&
github.event.inputs.force_release != 'true'
run: |
+ echo "🛑 EARLY EXIT: ${{ steps.quick_check.outputs.reason }}"
+ echo ""
echo "ℹ️ No changes detected since last release and force_release is not enabled."
- echo " Skipping release to avoid unnecessary version churn."
+ echo " Workflow will exit early to save resources."
+ echo ""
echo " To force a release anyway, run this workflow with 'force_release=true'"
-
- # Add summary to GITHUB_STEP_SUMMARY
- echo "### Nightly Release Skipped" >> $GITHUB_STEP_SUMMARY
- echo "- Reason: ${{ steps.quick_check.outputs.reason }}" >> $GITHUB_STEP_SUMMARY
- echo "- Has unreleased changelog content: ${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_STEP_SUMMARY
- echo "- Force release: ${{ github.event.inputs.force_release || 'false' }}" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
+ echo ""
+ echo "## 🛑 Early Exit Summary" >> $GITHUB_STEP_SUMMARY
+ echo "**Reason:** ${{ steps.quick_check.outputs.reason }}" >> $GITHUB_STEP_SUMMARY
+ echo "**Action:** Workflow exited early to save resources" >> $GITHUB_STEP_SUMMARY
echo "**Force Release:** Set 'force_release=true' to override this behavior" >> $GITHUB_STEP_SUMMARY
-
exit 0
-
+
- name: Continue with release process
- if: >-
- steps.quick_check.outputs.should_continue == 'true' ||
+ if: |
+ steps.quick_check.outputs.should_continue == 'true' ||
github.event.inputs.force_release == 'true'
run: |
echo "✅ Proceeding with release process..."
if [ "${{ github.event.inputs.force_release }}" == "true" ]; then
- echo "🚨 FORCE RELEASE: Overriding change detection"
+ echo "🔨 FORCE RELEASE: Overriding change detection"
fi
-
- - name: Extract changelog content before release
- if: >-
- steps.changelog_check.outputs.has_unreleased_content == 'true' ||
+
+ - name: Run release script
+ id: release
+ if: |
+ steps.quick_check.outputs.should_continue == 'true' ||
github.event.inputs.force_release == 'true'
+ env:
+ WAILS_REPO_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
+ GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
run: |
- echo "📝 Extracting changelog content before release..."
-
- # Use the new --create-release-notes flag
cd v3/tasks/release
- if go run release.go --create-release-notes ../../release_notes.md; then
- echo "✅ Successfully created release notes"
- cd ../..
-
- # Show release notes preview
- echo "Release notes preview:"
- head -10 ../../release_notes.md
- else
- echo "ℹ️ Could not create release notes, continuing without them"
- cd ../..
- fi
-
- - name: Process release and bump version
- id: process_release
- run: |
- echo "🔢 Processing release: updating changelog and bumping version.txt"
- cd v3/tasks/release
- # Run release processing (updates internal/version/version.txt and changelog)
- if go run release.go; then
- echo "✅ Release processing complete"
- else
- echo "❌ Release processing failed"
- exit 1
- fi
- cd ../..
- # Read the new version from version.txt
- NEW_VERSION=$(cat v3/internal/version/version.txt | tr -d '\r\n')
- if [ -z "$NEW_VERSION" ]; then
- echo "❌ Could not read new version from v3/internal/version/version.txt"
- exit 1
- fi
- # Ensure tag starts with 'v'
- case "$NEW_VERSION" in
- v*) NEW_TAG="$NEW_VERSION" ;;
- *) NEW_TAG="v$NEW_VERSION" ;;
- esac
- echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
- echo "tag=$NEW_TAG" >> $GITHUB_OUTPUT
- # Nightly v3-alpha are prereleases
- echo "is_prerelease=true" >> $GITHUB_OUTPUT
- echo "is_latest=false" >> $GITHUB_OUTPUT
- echo "version_changed=true" >> $GITHUB_OUTPUT
-
- - name: Commit updated version and changelog
- env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN }}
- run: |
- echo "📝 Committing updated version and changelog to v3-alpha"
- git config user.name "github-actions[bot]"
- git config user.email "github-actions[bot]@users.noreply.github.com"
- git add v3/internal/version/version.txt v3/docs/src/content/docs/changelog.mdx v3/UNRELEASED_CHANGELOG.md || true
- if git diff --cached --quiet; then
- echo "No changes to commit"
- else
- git commit -m "chore(v3): bump to ${{ steps.process_release.outputs.version }} and update changelog [skip ci]"
- git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" HEAD:v3-alpha
- fi
-
- - name: Create and push Git tag
- if: >-
- steps.process_release.outputs.version_changed == 'true'
- env:
- GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN }}
- run: |
- echo "🏷️ Creating and pushing git tag: ${{ steps.process_release.outputs.tag }}"
-
- # Try pushing the tag with debugging and error capture
- PUSH_SUCCESS=false
- PUSH_OUTPUT=$(cat << 'EOF'
- $(
- git tag -f "${{ steps.process_release.outputs.tag }}" &&
- if git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" "${{ steps.process_release.outputs.tag }}" 2>&1; then
- echo "SUCCESS"
- else
- echo "FAILURE"
- fi)
- EOF
- )
-
- if echo "$PUSH_OUTPUT" | grep -q "SUCCESS"; then
- echo "✅ Successfully pushed git tag to origin"
- PUSH_SUCCESS=true
- else
- echo "❌ Failed to push tag. Output:"
- echo "$PUSH_OUTPUT"
-
- # Check if tag already exists on remote
- echo "Checking if tag already exists on remote..."
- if git ls-remote --tags origin | grep -q "refs/tags/${{ steps.process_release.outputs.tag }}$"; then
- echo "ℹ️ Tag already exists on remote, treating as success"
- PUSH_SUCCESS=true
- else
- echo "❌ Tag does not exist on remote"
- fi
- fi
-
- if [ "$PUSH_SUCCESS" != "true" ]; then
- echo "❌ Could not push tag even after retries"
- exit 1
- fi
-
- - name: Create GitHub Release
- if: >-
- steps.process_release.outputs.version_changed == 'true'
- env:
- GITHUB_TOKEN: ${{ github.token }}
- run: |
- echo "🚀 Creating GitHub release for tag: ${{ steps.process_release.outputs.tag }}"
-
- # Prepare release notes content
- RELEASE_NOTES_FILE="release_notes.md"
- if [ -f "$RELEASE_NOTES_FILE" ]; then
- echo "Using generated release notes from $RELEASE_NOTES_FILE"
- else
- echo "No release notes file found, generating basic notes"
- echo "# Release ${{ steps.release.outputs.version }}" > $RELEASE_NOTES_FILE
- echo "Generated by nightly release workflow" >> $RELEASE_NOTES_FILE
- fi
-
- echo "Creating release via GitHub API..."
- API_URL="https://api.github.com/repos/${{ github.repository }}/releases"
- AUTH_HEADER="Authorization: Bearer ${GITHUB_TOKEN}"
- ACCEPT_HEADER="Accept: application/vnd.github+json"
- USER_AGENT_HEADER="User-Agent: nightly-release-script"
-
- # Create GitHub release using gh cli if available, fallback to API
- if command -v gh >/dev/null 2>&1; then
- echo "Using gh CLI to create release"
- if gh release create "${{ steps.process_release.outputs.tag }}" \
- --title "${{ steps.process_release.outputs.version }}" \
- --notes-file "$RELEASE_NOTES_FILE" \
- $([ "${{ steps.process_release.outputs.is_prerelease }}" == "true" ] && echo "--prerelease") \
- $([ "${{ steps.process_release.outputs.is_latest }}" == "true" ] && echo "--latest"); then
- echo "✅ GitHub release created successfully using gh CLI"
- else
- echo "❌ Failed to create GitHub release using gh CLI"
- exit 1
- fi
- else
- echo "gh CLI not available, using GitHub API"
-
- RELEASE_DATA=$(jq -n \
- --arg tag_name "${{ steps.process_release.outputs.tag }}" \
- --arg name "${{ steps.process_release.outputs.version }}" \
- --arg body "$(cat "$RELEASE_NOTES_FILE" | sed 's/"/\\"/g')" \
- --argjson prerelease $([ "${{ steps.process_release.outputs.is_prerelease }}" == "true" ] && echo true || echo false) \
- --argjson make_latest $([ "${{ steps.process_release.outputs.is_latest }}" == "true" ] && echo true || echo false) \
- '{ tag_name: $tag_name, name: $name, body: $body, prerelease: $prerelease, make_latest: $make_latest }')
-
- echo "Release data payload:"
- echo "$RELEASE_DATA" | jq '.'
-
- RESPONSE=$(curl -sS -X POST -H "$AUTH_HEADER" -H "$ACCEPT_HEADER" -H "$USER_AGENT_HEADER" -d "$RELEASE_DATA" "$API_URL")
- echo "GitHub API response:"
- echo "$RESPONSE" | jq '.'
-
- if echo "$RESPONSE" | jq -e '.id' >/dev/null; then
- echo "✅ GitHub release created successfully via API"
- else
- echo "❌ Failed to create GitHub release via API"
- exit 1
- fi
- fi
-
- - name: Read generated release notes
- id: read_notes
- if: >-
- steps.process_release.outputs.version_changed == 'true'
- run: |
- if [ -f "release_notes.md" ]; then
- echo "Reading release notes content..."
- echo "release_notes<> $GITHUB_OUTPUT
- cat release_notes.md >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- else
- echo "No release notes file found"
- echo "release_notes=" >> $GITHUB_OUTPUT
- fi
-
- - name: Handle GitHub Release Creation Result
- id: release_result
- if: >-
- steps.process_release.outputs.version_changed == 'true'
- run: |
- echo "🔍 Checking release result..."
-
- # Initialize variables
- HAS_GITHUB_ERRORS=false
- GITHUB_ERRORS=""
-
- # Check if we can access the release via API
- if command -v gh >/dev/null 2>&1; then
- echo "Checking release via gh CLI..."
- if gh release view "${{ steps.release.outputs.tag }}" >/dev/null 2>&1; then
- echo "✅ Release is accessible via gh CLI"
- else
- echo "⚠️ Release not accessible via gh CLI"
- HAS_GITHUB_ERRORS=true
- GITHUB_ERRORS="$GITHUB_ERRORS\n- Release not accessible via gh CLI"
- fi
- else
- echo "gh CLI not available, skipping CLI checks"
- fi
-
- echo "has_github_errors=$HAS_GITHUB_ERRORS" >> $GITHUB_OUTPUT
- if [ -n "$GITHUB_ERRORS" ]; then
- echo "github_errors=$GITHUB_ERRORS" >> $GITHUB_OUTPUT
- else
- echo "github_errors=" >> $GITHUB_OUTPUT
- fi
-
- - name: Error Summary and Reporting
- id: error_summary
- if: always()
- run: |
- echo "🧮 Generating comprehensive error summary..."
-
- # Initialize error tracking
- TOTAL_ERRORS=0
- ERROR_SUMMARY=""
- OVERALL_SUCCESS=true
-
- # Check for changelog errors
- if [ "${{ steps.changelog_check.outputs.has_errors }}" == "true" ]; then
- echo "❌ Changelog processing errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 📄 Changelog Processing Errors\n${{ steps.changelog_check.outputs.changelog_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for release script errors
- if [ "${{ steps.release.outputs.has_release_errors }}" == "true" ]; then
- echo "❌ Release script errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 🚀 Release Script Errors\n${{ steps.release.outputs.release_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Check for GitHub release errors
- if [ "${{ steps.release_result.outputs.has_github_errors }}" == "true" ]; then
- echo "❌ GitHub release errors detected"
- ERROR_SUMMARY="$ERROR_SUMMARY\n### 🐙 GitHub Release Errors\n${{ steps.release_result.outputs.github_errors }}\n"
- TOTAL_ERRORS=$((TOTAL_ERRORS + 1))
- OVERALL_SUCCESS=false
- fi
-
- # Set outputs for final summary
- echo "total_errors=$TOTAL_ERRORS" >> $GITHUB_OUTPUT
- echo "overall_success=$OVERALL_SUCCESS" >> $GITHUB_OUTPUT
-
- if [ -n "$ERROR_SUMMARY" ]; then
- echo "error_summary<> $GITHUB_OUTPUT
- echo -e "$ERROR_SUMMARY" >> $GITHUB_OUTPUT
- echo "EOF" >> $GITHUB_OUTPUT
- fi
-
- # Log summary
- if [ "$OVERALL_SUCCESS" == "true" ]; then
- echo "✅ Workflow completed successfully with no errors"
- else
- echo "⚠️ Workflow completed with $TOTAL_ERRORS error categories"
+ ARGS=()
+ if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
+ ARGS+=(--dry-run)
fi
+ go run release.go "${ARGS[@]}"
- name: Summary
if: always()
run: |
if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
- echo "## 🧪 DRY RUN Release Test Summary" >> $GITHUB_STEP_SUMMARY
+ echo "## 🧪 DRY RUN Release Summary" >> $GITHUB_STEP_SUMMARY
else
echo "## 🚀 Nightly Release Summary" >> $GITHUB_STEP_SUMMARY
fi
echo "================================" >> $GITHUB_STEP_SUMMARY
- echo "- **Version:** ${{ steps.process_release.outputs.version }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Tag:** ${{ steps.process_release.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Version Changed:** ${{ steps.process_release.outputs.version_changed }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Has existing tag:** ${{ steps.check_tag.outputs.has_tag }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Has unreleased changelog content:** ${{ steps.changelog_check.outputs.has_unreleased_content }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Has changes:** true" >> $GITHUB_STEP_SUMMARY
- echo "- **Is prerelease:** ${{ steps.process_release.outputs.is_prerelease }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Is latest:** ${{ steps.process_release.outputs.is_latest }}" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
-
- # Overall status
- if [ "${{ steps.error_summary.outputs.overall_success }}" == "true" ]; then
- if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
- echo "- **Mode:** 🧪 DRY RUN (no actual release created)" >> $GITHUB_STEP_SUMMARY
- echo "- **Status:** ✅ Test completed successfully" >> $GITHUB_STEP_SUMMARY
+
+ if [ -n "${{ steps.release.outputs.release_version }}" ]; then
+ echo "- **Version:** ${{ steps.release.outputs.release_version }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Tag:** ${{ steps.release.outputs.release_tag }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Status:** ${{ steps.release.outcome == 'success' && '✅ Success' || '⚠️ Failed' }}" >> $GITHUB_STEP_SUMMARY
+ echo "- **Mode:** ${{ steps.release.outputs.release_dry_run == 'true' && '🧪 Dry Run' || '🚀 Live release' }}" >> $GITHUB_STEP_SUMMARY
+ if [ -n "${{ steps.release.outputs.release_url }}" ]; then
+ echo "- **Release URL:** ${{ steps.release.outputs.release_url }}" >> $GITHUB_STEP_SUMMARY
+ fi
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### Changelog" >> $GITHUB_STEP_SUMMARY
+ if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
+ echo "✅ Unreleased changelog processed and reset." >> $GITHUB_STEP_SUMMARY
else
- echo "- **Mode:** 🚀 Live release" >> $GITHUB_STEP_SUMMARY
- echo "- **Status:** ✅ Release created successfully" >> $GITHUB_STEP_SUMMARY
+ echo "ℹ️ No unreleased changelog content detected." >> $GITHUB_STEP_SUMMARY
fi
else
- echo "- **Mode:** ${{ github.event.inputs.dry_run == 'true' && '🧪 DRY RUN' || '🚀 Live release' }}" >> $GITHUB_STEP_SUMMARY
- echo "- **Status:** ⚠️ Completed with ${{ steps.error_summary.outputs.total_errors }} error(s)" >> $GITHUB_STEP_SUMMARY
- fi
-
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### Release Processing" >> $GITHUB_STEP_SUMMARY
- if [ "${{ steps.process_release.outputs.version_changed }}" == "true" ]; then
- echo "✅ **Version was incremented** and release created" >> $GITHUB_STEP_SUMMARY
- else
- echo "ℹ️ **Version was not changed** - no release created" >> $GITHUB_STEP_SUMMARY
- fi
-
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### Changelog Processing" >> $GITHUB_STEP_SUMMARY
- if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
- echo "✅ **UNRELEASED_CHANGELOG.md** had content and was processed" >> $GITHUB_STEP_SUMMARY
- echo "- Content moved to main changelog" >> $GITHUB_STEP_SUMMARY
- echo "- UNRELEASED_CHANGELOG.md reset with template" >> $GITHUB_STEP_SUMMARY
- else
- echo "ℹ️ **UNRELEASED_CHANGELOG.md** had no content to process" >> $GITHUB_STEP_SUMMARY
- fi
-
- # Error reporting section
- if [ "${{ steps.error_summary.outputs.total_errors }}" -gt 0 ]; then
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "## ⚠️ Error Report" >> $GITHUB_STEP_SUMMARY
- echo "**Total Error Categories:** ${{ steps.error_summary.outputs.total_errors }}" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "${{ steps.error_summary.outputs.error_summary }}" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### 🔧 Troubleshooting Tips" >> $GITHUB_STEP_SUMMARY
- echo "- Check the individual step logs above for detailed error messages" >> $GITHUB_STEP_SUMMARY
- echo "- Verify GitHub token permissions (contents: write, pull-requests: read)" >> $GITHUB_STEP_SUMMARY
- echo "- Ensure UNRELEASED_CHANGELOG.md follows the expected format" >> $GITHUB_STEP_SUMMARY
- echo "- Check for network connectivity issues if git/GitHub operations failed" >> $GITHUB_STEP_SUMMARY
- echo "- Re-run the workflow with 'force_release=true' if needed" >> $GITHUB_STEP_SUMMARY
- fi
-
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### Release Notes Preview" >> $GITHUB_STEP_SUMMARY
- if [ -n "${{ steps.read_notes.outputs.release_notes }}" ]; then
- echo "${{ steps.read_notes.outputs.release_notes }}" >> $GITHUB_STEP_SUMMARY
- else
- echo "No specific release notes generated" >> $GITHUB_STEP_SUMMARY
- fi
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "---" >> $GITHUB_STEP_SUMMARY
- echo "*Generated by automated nightly release workflow with enhanced error handling and changelog integration*" >> $GITHUB_STEP_SUMMARY
-
- # Set final workflow status
- if [ "${{ steps.error_summary.outputs.overall_success }}" != "true" ]; then
- echo "⚠️ Workflow completed with errors. Check the summary above for details."
- exit 1
+ echo "- Release script did not run (skipped or failed before execution)." >> $GITHUB_STEP_SUMMARY
fi
+
diff --git a/v2/examples/customlayout/go.mod b/v2/examples/customlayout/go.mod
index c7ead2202..e1a17304e 100644
--- a/v2/examples/customlayout/go.mod
+++ b/v2/examples/customlayout/go.mod
@@ -27,7 +27,7 @@ require (
github.com/tkrajina/go-reflector v0.5.8 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
- github.com/wailsapp/go-webview2 v1.0.19 // indirect
+ github.com/wailsapp/go-webview2 v1.0.22 // indirect
github.com/wailsapp/mimetype v1.4.1 // indirect
golang.org/x/crypto v0.33.0 // indirect
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
diff --git a/v2/examples/customlayout/go.sum b/v2/examples/customlayout/go.sum
index d5caf9fef..f1995affb 100644
--- a/v2/examples/customlayout/go.sum
+++ b/v2/examples/customlayout/go.sum
@@ -72,6 +72,7 @@ github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+
github.com/wailsapp/go-webview2 v1.0.10 h1:PP5Hug6pnQEAhfRzLCoOh2jJaPdrqeRgJKZhyYyDV/w=
github.com/wailsapp/go-webview2 v1.0.10/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
github.com/wailsapp/go-webview2 v1.0.19/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc=
+github.com/wailsapp/go-webview2 v1.0.22/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc=
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
From 6943a56e8fc2ef2ceb5b2706c3a2343aafc3349c Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Sat, 27 Sep 2025 12:13:12 +1000
Subject: [PATCH 15/99] chore: update sponsors.svg (#4603)
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
---
website/static/img/sponsors.svg | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/website/static/img/sponsors.svg b/website/static/img/sponsors.svg
index 8364130a8..7edefbc64 100644
--- a/website/static/img/sponsors.svg
+++ b/website/static/img/sponsors.svg
@@ -15,21 +15,13 @@ text {
font-size: 20px;
}
-
-