Skip to content

Commit 85f5098

Browse files
committed
chore(flatpak): Separate Flatpak CI architecture
1 parent 789f5b3 commit 85f5098

3 files changed

Lines changed: 12 additions & 24 deletions

File tree

.github/workflows/release-flatpak.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77
value: ${{ jobs.flatpak.outputs.artifact-name }}
88
bundle-name:
99
value: ${{ jobs.flatpak.outputs.bundle-name }}
10-
source-name:
11-
value: ${{ jobs.flatpak.outputs.source-name }}
1210

1311
jobs:
1412
flatpak:
@@ -17,7 +15,6 @@ jobs:
1715
outputs:
1816
artifact-name: ${{ steps.names.outputs.artifact_name }}
1917
bundle-name: ${{ steps.names.outputs.bundle_name }}
20-
source-name: ${{ steps.names.outputs.source_name }}
2118
steps:
2219
- name: Check out sources
2320
uses: actions/checkout@v4
@@ -40,10 +37,11 @@ jobs:
4037
fi
4138
4239
mkdir -p dist
40+
ARCH="$(uname -m)"
4341
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
42+
echo "arch=${ARCH}" >> "$GITHUB_OUTPUT"
4443
echo "artifact_name=flatpak-bundle" >> "$GITHUB_OUTPUT"
45-
echo "bundle_name=aetheris-${VERSION}.flatpak" >> "$GITHUB_OUTPUT"
46-
echo "source_name=aetheris-${VERSION}-source.zip" >> "$GITHUB_OUTPUT"
44+
echo "bundle_name=aetheris-${VERSION}-linux-${ARCH}.flatpak" >> "$GITHUB_OUTPUT"
4745
4846
- name: Install Flatpak builder
4947
run: |
@@ -69,19 +67,9 @@ jobs:
6967
stable
7068
cp "target/flatpak/${{ steps.names.outputs.bundle_name }}" "dist/${{ steps.names.outputs.bundle_name }}"
7169
72-
- name: Create source archive
73-
run: |
74-
git archive \
75-
--format=zip \
76-
--prefix="aetheris-${{ steps.names.outputs.version }}/" \
77-
--output="dist/${{ steps.names.outputs.source_name }}" \
78-
HEAD
79-
8070
- name: Upload release assets
8171
uses: actions/upload-artifact@v4
8272
with:
8373
name: flatpak-bundle
84-
path: |
85-
dist/${{ steps.names.outputs.bundle_name }}
86-
dist/${{ steps.names.outputs.source_name }}
74+
path: dist/${{ steps.names.outputs.bundle_name }}
8775
retention-days: 1

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,5 @@ jobs:
7474
dist/aetheris-*-macos-*.dmg
7575
dist/${{ needs.windows.outputs.bundle-name }}
7676
dist/${{ needs.windows.outputs.setup-name }}
77-
dist/${{ needs.flatpak.outputs.source-name }}
7877
generate_release_notes: true
7978
prerelease: ${{ contains(github.ref_name, '-') }}

CONTRIBUTING.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ sudo dnf install flatpak flatpak-builder
102102
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
103103

104104
mkdir -p target/flatpak
105+
flatpak_arch="$(uname -m)"
105106
flatpak-builder \
106107
--user \
107108
--force-clean \
@@ -113,15 +114,15 @@ flatpak-builder \
113114

114115
flatpak build-bundle \
115116
target/flatpak/repo \
116-
target/flatpak/aetheris-dev.flatpak \
117+
"target/flatpak/aetheris-dev-linux-${flatpak_arch}.flatpak" \
117118
org.luminusos.Aetheris \
118119
stable
119120
```
120121

121122
Install and run it with:
122123

123124
```sh
124-
flatpak install --user --reinstall target/flatpak/aetheris-dev.flatpak
125+
flatpak install --user --reinstall "target/flatpak/aetheris-dev-linux-$(uname -m).flatpak"
125126
flatpak run org.luminusos.Aetheris
126127
```
127128

@@ -176,11 +177,11 @@ git push origin v1.0.0-rc1
176177
The release workflow validates the tag against `[workspace.package].version`
177178
in `Cargo.toml` and `[package].version` in `crates/aetheris-app/Cargo.toml`,
178179
runs CI, builds Flatpak, AppImage, macOS `.dmg`, Windows portable `.zip`, and
179-
Windows setup `.exe` bundles, creates a source zip, and publishes the artifacts
180-
to GitHub Releases. The macOS bundles are generated with `cargo-bundle`,
181-
Homebrew GTK runtime dylibs, and `create-dmg`. The Windows portable bundle
182-
contains `bin/aetheris.exe` plus the GTK runtime files it needs, and the setup
183-
`.exe` is generated with Inno Setup.
180+
Windows setup `.exe` bundles, and publishes the artifacts to GitHub Releases.
181+
GitHub provides the release source archives automatically. The macOS bundles are
182+
generated with `cargo-bundle`, Homebrew GTK runtime dylibs, and `create-dmg`.
183+
The Windows portable bundle contains `bin/aetheris.exe` plus the GTK runtime
184+
files it needs, and the setup `.exe` is generated with Inno Setup.
184185

185186
## Pull Request Checklist
186187

0 commit comments

Comments
 (0)