Merge pull request 'feat: expose application version and update CI release workflow' (#1) from v1.0.0 into main

Reviewed-on: http://git.jdbnet.co.uk/jamie/goexplore/pulls/1
This commit was merged in pull request #1.
This commit is contained in:
2026-06-09 13:55:23 +01:00
9 changed files with 145 additions and 90 deletions
-48
View File
@@ -1,48 +0,0 @@
name: Build and Upload Binaries
on:
push:
branches:
- main
jobs:
build-and-upload:
runs-on: build-htz-01
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build Windows and Linux AMD64 binaries
run: |
mkdir -p dist
# Build Linux amd64 and Windows amd64 binaries
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace cr.jdbnet.co.uk/jdbnet/wails-builder:latest bash -c "
# Install frontend dependencies
cd frontend && npm install && cd ..
# Linux amd64
wails build -platform linux/amd64 -tags webkit2_41 -clean
cp build/bin/goexplore dist/goexplore-linux-amd64
# Windows amd64
wails build -platform windows/amd64 -clean -nsis
cp build/bin/GoExplore-amd64-installer.exe dist/goexplore-windows-installer.exe
"
- name: Upload to Cloudflare R2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: auto
R2_ENDPOINT: ${{ secrets.R2_ENDPOINT_URL }}
run: |
aws s3 cp dist/goexplore-linux-amd64 s3://apps/goexplore/goexplore-linux-amd64 --endpoint-url "$R2_ENDPOINT"
aws s3 cp dist/goexplore-windows-installer.exe s3://apps/goexplore/goexplore-windows-installer.exe --endpoint-url "$R2_ENDPOINT"
- name: Clean up
run: sudo rm -rf dist build/bin/*
+81
View File
@@ -0,0 +1,81 @@
name: Release
on:
pull_request:
branches:
- main
types: [closed]
jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'v')
runs-on: build-htz-01
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract Version
id: get_version
run: |
# Remove 'v' prefix for some contexts if needed, but we'll use it raw
RAW_VERSION=${{ github.head_ref }}
CLEAN_VERSION=${RAW_VERSION#v}
echo "VERSION=${RAW_VERSION}" >> $GITHUB_OUTPUT
echo "CLEAN_VERSION=${CLEAN_VERSION}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build Binaries
run: |
mkdir -p dist
# Build Linux amd64 and Windows amd64 binaries using custom docker image
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace cr.jdbnet.co.uk/jdbnet/wails-builder:latest bash -c "
# Inject version into wails.json for NSIS & executable properties
sed -i 's/\"productVersion\": \".*\"/\"productVersion\": \"${{ steps.get_version.outputs.CLEAN_VERSION }}\"/' wails.json
# Install frontend dependencies
cd frontend && npm install && cd ..
# Linux amd64
wails build -platform linux/amd64 -tags webkit2_41 -clean -ldflags \"-X main.Version=${{ steps.get_version.outputs.VERSION }}\"
cp build/bin/goexplore dist/goexplore-linux-amd64
# Windows amd64
wails build -platform windows/amd64 -clean -nsis -ldflags \"-X main.Version=${{ steps.get_version.outputs.VERSION }}\"
cp build/bin/GoExplore-amd64-installer.exe dist/goexplore-windows-installer.exe
"
# - name: Generate Changelog
# id: changelog
# uses: https://github.com/metcalfc/changelog-generator@v4.6.2
# with:
# myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Create Gitea Release
uses: https://gitea.com/actions/gitea-release-action@v1
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
name: GoExplore ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
files: |
dist/goexplore-linux-amd64
dist/goexplore-windows-installer.exe
- name: Upload to Cloudflare R2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: auto
R2_ENDPOINT: ${{ secrets.R2_ENDPOINT_URL }}
run: |
aws s3 cp dist/goexplore-linux-amd64 s3://apps/goexplore/goexplore-linux-amd64 --endpoint-url "$R2_ENDPOINT"
aws s3 cp dist/goexplore-windows-installer.exe s3://apps/goexplore/goexplore-windows-installer.exe --endpoint-url "$R2_ENDPOINT"
- name: Clean up
run: sudo rm -rf dist build/bin/*
+4
View File
@@ -44,6 +44,10 @@ func (a *App) startup(ctx context.Context) {
a.ctx = ctx
}
func (a *App) GetVersion() string {
return Version
}
func (a *App) GetConnections() []config.ConnectionConfig {
if a.cfg == nil {
return nil
+1
View File
@@ -11,6 +11,7 @@
<div class="sidebar-header">
<img src="./src/assets/appicon.png" alt="Icon" style="width: 24px; height: 24px; margin-right: 0.5rem;"/>
<span>GoExplore</span>
<span id="app-version" style="font-size: 0.7rem; color: var(--text-secondary); margin-left: 0.5rem; border: 1px solid var(--border); padding: 0.1rem 0.3rem; border-radius: 4px;"></span>
</div>
<div class="conn-list" id="conn-list">
<!-- Connections will be populated here -->
+9 -1
View File
@@ -1,4 +1,4 @@
import { ListDir, GetConnections, SaveConnection, DeleteConnection, Delete, Rename, PromptUploadFiles, PromptUploadDirectory, PromptDownload, TransferItems, GetTransfers, ClearTransfers } from '../wailsjs/go/main/App.js';
import { GetVersion, ListDir, GetConnections, SaveConnection, DeleteConnection, Delete, Rename, PromptUploadFiles, PromptUploadDirectory, PromptDownload, TransferItems, GetTransfers, ClearTransfers } from '../wailsjs/go/main/App.js';
let currentConn = 'local';
let currentPath = '';
@@ -24,6 +24,14 @@ async function init() {
}
}
try {
const version = await GetVersion();
const vSpan = document.getElementById('app-version');
if (vSpan && version) {
vSpan.innerText = version;
}
} catch (e) { }
await loadConnections();
await loadDirectory(currentConn, currentPath);
+2
View File
@@ -15,6 +15,8 @@ export function GetConnections():Promise<Array<config.ConnectionConfig>>;
export function GetTransfers():Promise<Array<transfer.Transfer>>;
export function GetVersion():Promise<string>;
export function ListDir(arg1:string,arg2:string):Promise<Array<explorer.FileEntry>>;
export function MkDir(arg1:string,arg2:string):Promise<void>;
+4
View File
@@ -22,6 +22,10 @@ export function GetTransfers() {
return window['go']['main']['App']['GetTransfers']();
}
export function GetVersion() {
return window['go']['main']['App']['GetVersion']();
}
export function ListDir(arg1, arg2) {
return window['go']['main']['App']['ListDir'](arg1, arg2);
}
+2
View File
@@ -20,6 +20,8 @@ var assets embed.FS
//go:embed build/appicon.png
var icon []byte
var Version string = "dev"
func installLinux() {
if runtime.GOOS != "linux" {
return
+2 -1
View File
@@ -11,6 +11,7 @@
},
"info": {
"companyName": "JDB-NET Limited",
"productName": "GoExplore"
"productName": "GoExplore",
"productVersion": "0.0.0"
}
}