From fd13aded8736406ef1e3cceedb5cba4cc0d55c37 Mon Sep 17 00:00:00 2001 From: Leon Mika Date: Sun, 1 Feb 2026 09:33:30 +1100 Subject: [PATCH] Added a release build --- .forgejo/workflows/build.yml | 9 --------- .forgejo/workflows/release.yml | 36 ++++++++++++++++++++++++++++++++++ main.go | 6 +++++- 3 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 .forgejo/workflows/release.yml diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index ab0f2e6..83d108f 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -25,12 +25,3 @@ jobs: run: | npm install wails build -clean -platform darwin/arm64 - - name: Bundle - run: | - cd build/bin/ - zip -r dequoter-darwin-arm64.zip Dequoter.app - - name: Upload build artifacts - uses: actions/upload-artifact@v3 - with: - name: dequoter-darwin-arm64 - path: build/bin/dequoter-darwin-arm64.zip diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 0000000..064d4fb --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release Build + +on: + push: + tags: + - v* + +jobs: + build: + runs-on: macos + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.24 + - name: Installing Wails + run: | + go install github.com/wailsapp/wails/v2/cmd/wails@latest + - name: Running Wails doctor + run: | + wails doctor + - name: Build + run: | + npm install + wails build -clean -platform darwin/arm64 -ldflags "-X main.VersionNumber=`git describe --tags --abbrev=0`" + - name: Bundle + run: | + cd build/bin/ + zip -r dequoter-darwin-arm64.zip Dequoter.app + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: dequoter-darwin-arm64 + path: build/bin/dequoter-darwin-arm64.zip diff --git a/main.go b/main.go index 5fcbfca..0d3626f 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,10 @@ import ( "github.com/wailsapp/wails/v2/pkg/options/mac" ) +var ( + VersionNumber = "development" +) + //go:embed all:frontend/dist var assets embed.FS @@ -59,7 +63,7 @@ func main() { Mac: &mac.Options{ About: &mac.AboutInfo{ Title: "Dequoter", - Message: "© 2025 Leon Mika", + Message: "© 2025-2026 Leon Mika\nVersion: " + VersionNumber, }, }, })