Skip to content

Commit 15548f2

Browse files
committed
ci(cd): package linux fyne app with versioned
artifacts
1 parent 71b644b commit 15548f2

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/cd.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CD
2+
3+
on:
4+
workflow_dispatch: # Trigger this workflow manually
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
package-linux:
11+
name: Package Linux App
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: 1.25
22+
23+
- name: Setup Fyne
24+
uses: ./.github/actions/fyne-linux-setup
25+
26+
- name: Install Fyne tool
27+
run: go install fyne.io/tools/cmd/fyne@latest
28+
29+
- name: Read metadata
30+
run: |
31+
APP_NAME=$(grep '^Name' FyneApp.toml | sed 's/.*= "\(.*\)"/\1/')
32+
APP_VERSION=$(grep '^Version' FyneApp.toml | sed 's/.*= "\(.*\)"/\1/')
33+
ARCH=$(uname -m)
34+
35+
echo "APP_NAME=$APP_NAME" >> $GITHUB_ENV
36+
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
37+
echo "ARCH=$ARCH" >> $GITHUB_ENV
38+
39+
echo "Packaging $APP_NAME version $APP_VERSION for linux/$ARCH"
40+
41+
- name: Package application for Linux
42+
run: fyne package --release
43+
44+
- name: Rename Linux package
45+
run: |
46+
ORIGINAL="${APP_NAME}.tar.xz"
47+
TARGET="${APP_NAME}-${APP_VERSION}-linux-${ARCH}.tar.xz"
48+
49+
mv "$ORIGINAL" "$TARGET"
50+
51+
- name: Upload Linux artifact
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: fyne-linux-${{ env.APP_VERSION }}-${{ env.ARCH }}
55+
path: |
56+
*-linux-*.tar.xz

0 commit comments

Comments
 (0)