Skip to content

Commit f6a5d0a

Browse files
committed
Merge branch 'make_github_release'
2 parents 66f5773 + 53bdf1d commit f6a5d0a

4 files changed

Lines changed: 164 additions & 75 deletions

File tree

.github/workflows/build.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
build-windows:
7+
required: false
8+
type: boolean
9+
default: true
10+
build-linux:
11+
required: false
12+
type: boolean
13+
default: true
14+
build-macos:
15+
required: false
16+
type: boolean
17+
default: true
18+
19+
env:
20+
FLUTTER_VERSION: 3.13.9
21+
22+
jobs:
23+
build-windows:
24+
name: Build on Windows
25+
runs-on: windows-latest
26+
steps:
27+
- uses: actions/checkout@v3
28+
29+
- name: Setup Flutter
30+
uses: subosito/flutter-action@v2
31+
with:
32+
flutter-version: ${{ env.FLUTTER_VERSION }}
33+
34+
- name: Enable Windows desktop
35+
run: flutter config --enable-windows-desktop
36+
37+
- name: Install dependencies
38+
run: flutter pub get
39+
40+
- name: Build Windows app
41+
run: flutter build windows
42+
43+
- name: Upload artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: windows-build
47+
path: build/windows/runner/Release/
48+
49+
build-linux:
50+
name: Build on Linux
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v3
54+
55+
- name: Setup Flutter
56+
uses: subosito/flutter-action@v2
57+
with:
58+
flutter-version: ${{ env.FLUTTER_VERSION }}
59+
60+
- name: Enable Linux desktop
61+
run: flutter config --enable-linux-desktop
62+
63+
- name: Install dependencies
64+
run: flutter pub get
65+
66+
- name: Install Linux build dependencies
67+
run: sudo apt-get update && sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
68+
69+
- name: Build Linux app
70+
run: flutter build linux --verbose
71+
72+
- name: Upload artifact
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: linux-build
76+
path: build/linux/x64/release/bundle
77+
78+
build-macos:
79+
name: Build on macOS
80+
runs-on: macos-latest
81+
steps:
82+
- uses: actions/checkout@v3
83+
84+
- name: Setup Flutter
85+
uses: subosito/flutter-action@v2
86+
with:
87+
flutter-version: ${{ env.FLUTTER_VERSION }}
88+
89+
- name: Enable macOS desktop
90+
run: flutter config --enable-macos-desktop
91+
92+
- name: Install dependencies
93+
run: flutter pub get
94+
95+
- name: Build macOS app
96+
run: flutter build macos
97+
98+
- name: Upload artifact
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: macos-build
102+
path: build/macos/Build/Products/Release/fdupes_gui.app
103+

.github/workflows/pr.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: PR build
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [master]
7+
8+
jobs:
9+
build:
10+
uses: ./.github/workflows/build.yml

.github/workflows/release.yml

Lines changed: 45 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,63 @@
1-
name: release builds
1+
name: Release
22

33
on:
4-
workflow_dispatch:
54
push:
65
tags:
76
- 'release/*'
87

9-
env:
10-
FLUTTER_VERSION: 3.13.9
11-
128
jobs:
13-
build-windows:
14-
name: Build on Windows
15-
runs-on: windows-latest
16-
steps:
17-
- uses: actions/checkout@v3
18-
19-
- name: Setup Flutter
20-
uses: subosito/flutter-action@v2
21-
with:
22-
flutter-version: ${{ env.FLUTTER_VERSION }}
23-
24-
- name: Enable Windows desktop
25-
run: flutter config --enable-windows-desktop
9+
build:
10+
uses: ./.github/workflows/build.yml
2611

27-
- name: Install dependencies
28-
run: flutter pub get
29-
30-
- name: Build Windows App
31-
run: flutter build windows
32-
33-
- name: Upload artifact
34-
uses: actions/upload-artifact@v4
35-
with:
36-
name: windows-installer
37-
path: build/windows/runner/Release/
38-
39-
build-linux:
40-
name: Build on Linux
12+
release:
4113
runs-on: ubuntu-latest
14+
needs: [build-windows, build-linux, build-macos]
4215
steps:
4316
- uses: actions/checkout@v3
4417

45-
- name: Setup Flutter
46-
uses: subosito/flutter-action@v2
18+
- name: Extract version from tag
19+
id: release_info
20+
shell: bash
21+
run: |
22+
VERSION=${GITHUB_REF#refs/tags/release/}
23+
NOTES=$(awk "/^## $VERSION/ {flag=1; next} /^## / {if (flag) exit} flag" CHANGELOG.md)
24+
25+
echo "version=$VERSION" >> $GITHUB_OUTPUT
26+
echo "notes<<EOF" >> $GITHUB_OUTPUT
27+
echo "$NOTES" >> $GITHUB_OUTPUT
28+
echo "EOF" >> $GITHUB_OUTPUT
29+
30+
- name: Download Windows artifact
31+
uses: actions/download-artifact@v4
4732
with:
48-
flutter-version: ${{ env.FLUTTER_VERSION }}
49-
50-
- name: Enable Linux desktop
51-
run: flutter config --enable-linux-desktop
33+
name: windows-build
34+
path: out/windows
5235

53-
- name: Install dependencies
54-
run: flutter pub get
55-
56-
- name: Install Linux build dependencies
57-
run: sudo apt-get update && sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
58-
59-
- name: Build Linux App
60-
run: flutter build linux
61-
62-
- name: Upload artifact
63-
uses: actions/upload-artifact@v4
36+
- name: Download Linux artifact
37+
uses: actions/download-artifact@v4
6438
with:
65-
name: linux-installer
66-
path: /build/linux/x64/release/bundle
67-
68-
build-macos:
69-
name: Build on macOS
70-
runs-on: macos-latest
71-
steps:
72-
- uses: actions/checkout@v3
39+
name: linux-build
40+
path: out/linux
7341

74-
- name: Setup Flutter
75-
uses: subosito/flutter-action@v2
42+
- name: Download macOS artifact
43+
uses: actions/download-artifact@v4
7644
with:
77-
flutter-version: ${{ env.FLUTTER_VERSION }}
78-
79-
- name: Enable macOS desktop
80-
run: flutter config --enable-macos-desktop
81-
82-
- name: Install dependencies
83-
run: flutter pub get
84-
85-
- name: Build macOS App
86-
run: flutter build macos
87-
88-
- name: Upload artifact
89-
uses: actions/upload-artifact@v4
45+
name: macos-build
46+
path: out/macos
47+
48+
- name: Create zip files with version
49+
run: |
50+
cd out
51+
zip -r fdupes_gui-${{ steps.vars.outputs.version }}-windows.zip windows
52+
zip -r fdupes_gui-${{ steps.vars.outputs.version }}-linux.x86_64.zip linux
53+
zip -r fdupes_gui-${{ steps.vars.outputs.version }}-macos.universal.zip macos
54+
55+
- name: Release
56+
uses: softprops/action-gh-release@v2
9057
with:
91-
name: macos-installer
92-
path: build/macos/Build/Products/Release/fdupes_gui.app
93-
58+
name: "v${{ steps.release_info.outputs.version }}"
59+
body: ${{ steps.release_info.outputs.notes }}
60+
files: |
61+
out/fdupes_gui-${{ steps.vars.outputs.version }}-windows.zip
62+
out/fdupes_gui-${{ steps.vars.outputs.version }}-linux.x86_64.zip
63+
out/fdupes_gui-${{ steps.vars.outputs.version }}-macos.universal.zip

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Changelog
2+
3+
## 0.2.2 2025-04-13
4+
5+
* add windows support
6+
17
## 0.2.1 - 2024-10-03
28

39
* add locate fdupes button when fdupes binary is not found in path

0 commit comments

Comments
 (0)