Skip to content

Commit

Permalink
electron: Fix build of arm64 flatpaks
Browse files Browse the repository at this point in the history
Previously the "arm" flatpak artifacts were actually x64 ones, worngly build and renamed.

This commit also makes sure to use the exactly artifacts names on upload.
  • Loading branch information
rafaellehmkuhl committed Oct 16, 2024
1 parent 9235b47 commit 33ab145
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: Cockpit-${{ matrix.suffix }}-${{ matrix.arch }}-${{ env.VERSION }}.${{ matrix.extension }}
path: dist/Cockpit*.${{ matrix.extension }}
path: dist/Cockpit-${{ matrix.suffix }}-${{ matrix.arch }}-${{ env.VERSION }}.${{ matrix.extension }}
if-no-files-found: error

- name: Upload diff artifact (mac-only)
Expand Down Expand Up @@ -223,17 +223,30 @@ jobs:
- name: Set version as environment variable (others)
run: echo "VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_ENV

- name: Build electron
- name: Build electron (arm)
if: matrix.os == 'ubuntu-24-arm'
run: |
bun install --frozen-lockfile
bun run build
env DEBUG="@malept/flatpak-bundler" bun run deploy:flatpak --arm64
- name: Build electron (x86_64)
if: matrix.os == 'ubuntu-latest'
run: |
bun install --frozen-lockfile
bun run build
env DEBUG="@malept/flatpak-bundler" bun run deploy:flatpak
env DEBUG="@malept/flatpak-bundler" bun run deploy:flatpak --x64
- name: Rename 'aarch64' to 'arm64'
if: matrix.os == 'ubuntu-24-arm'
run: |
mv dist/Cockpit-${{ matrix.suffix }}-aarch64-${{ env.VERSION }}.${{ matrix.extension }} dist/Cockpit-${{ matrix.suffix }}-${{ matrix.arch }}-${{ env.VERSION }}.${{ matrix.extension }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Cockpit-${{ matrix.suffix }}-${{ matrix.arch }}-${{ env.VERSION }}.${{ matrix.extension }}
path: dist/Cockpit*.${{ matrix.extension }}
path: dist/Cockpit-${{ matrix.suffix }}-${{ matrix.arch }}-${{ env.VERSION }}.${{ matrix.extension }}
if-no-files-found: error

- name: Upload Release
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"coverage": "vitest --coverage",
"deploy:electron:dir": "ELECTRON=true electron-builder --dir",
"deploy:electron": "ELECTRON=true electron-builder --publish=never -c.extraMetadata.version=$(git describe --tags --abbrev=0 | sed 's/^v//')",
"deploy:flatpak": "ELECTRON=true electron-builder --x64 --publish=never --linux flatpak -c.extraMetadata.version=$(git describe --tags --abbrev=0 | sed 's/^v//')",
"deploy:flatpak": "ELECTRON=true electron-builder --linux flatpak --publish=never -c.extraMetadata.version=$(git describe --tags --abbrev=0 | sed 's/^v//')",
"dev": "vite --host",
"dev:electron": "ELECTRON=true vite --host",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore --max-warnings=0",
Expand Down

0 comments on commit 33ab145

Please sign in to comment.