mirror of
https://github.com/Xevion/HATray.git
synced 2025-12-06 15:15:16 -06:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 57ddab9032 | |||
| d5536423bb |
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -27,15 +27,17 @@ jobs:
|
|||||||
version: "3.x"
|
version: "3.x"
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt-get install -y libgtk-3-dev libayatana-appindicator3-dev
|
||||||
|
|
||||||
- name: Build Linux Binary
|
- name: Build Linux Binary
|
||||||
run: task build
|
run: task build
|
||||||
|
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: get_version
|
id: get_version
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo 'unknown')
|
echo "VERSION=$(task version --silent)" >> $GITHUB_OUTPUT
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
echo "BINARY_NAME=HATray-linux-amd64-$(task version --silent)" >> $GITHUB_OUTPUT
|
||||||
echo "BINARY_NAME=HATray-linux-amd64-$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Rename Linux Binary with Version
|
- name: Rename Linux Binary with Version
|
||||||
run: mv bin/HATray ${{ steps.get_version.outputs.BINARY_NAME }}
|
run: mv bin/HATray ${{ steps.get_version.outputs.BINARY_NAME }}
|
||||||
@@ -73,16 +75,8 @@ jobs:
|
|||||||
id: get_version_win
|
id: get_version_win
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
# Extract the version using git tags, fallback to 'unknown' if it fails
|
echo "VERSION=$(task version --silent)" >> $env:GITHUB_OUTPUT
|
||||||
try {
|
echo "BINARY_NAME=HATray-windows-amd64-$(task version --silent)" >> $env:GITHUB_OUTPUT
|
||||||
$version = git describe --tags --abbrev=0 2>$null
|
|
||||||
if ([string]::IsNullOrWhiteSpace($version)) { $version = 'unknown' }
|
|
||||||
} catch {
|
|
||||||
$version = 'unknown'
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "VERSION=$($version.Trim())" >> $env:GITHUB_OUTPUT
|
|
||||||
echo "BINARY_NAME=HATray-windows-amd64-$($version.Trim())" >> $env:GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Rename Windows Binary with Version
|
- name: Rename Windows Binary with Version
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|||||||
11
Taskfile.yml
11
Taskfile.yml
@@ -1,8 +1,8 @@
|
|||||||
version: '3'
|
version: "3"
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
APP_NAME: 'HATray'
|
APP_NAME: "HATray"
|
||||||
VERSION: '0.0.1'
|
VERSION: "0.0.1"
|
||||||
|
|
||||||
includes:
|
includes:
|
||||||
build:
|
build:
|
||||||
@@ -44,3 +44,8 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- echo "Development workflow complete"
|
- echo "Development workflow complete"
|
||||||
- echo "Run 'task windows:run' to start the application"
|
- echo "Run 'task windows:run' to start the application"
|
||||||
|
|
||||||
|
version:
|
||||||
|
desc: "Show the version of the application"
|
||||||
|
cmds:
|
||||||
|
- git describe --tags --abbrev=0 2>/dev/null || echo "unknown"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ version: "3"
|
|||||||
vars:
|
vars:
|
||||||
BINARY_NAME: "{{.APP_NAME}}.exe"
|
BINARY_NAME: "{{.APP_NAME}}.exe"
|
||||||
VERSION:
|
VERSION:
|
||||||
sh: powershell -Command "try { agit describe --tags --abbrev=0 } catch { 'unknown' }"
|
sh: powershell -Command "try { git describe --tags --abbrev=0 } catch { 'unknown' }"
|
||||||
COMMIT:
|
COMMIT:
|
||||||
sh: git rev-parse --short HEAD
|
sh: git rev-parse --short HEAD
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user