Skip to content

Commit

Permalink
electron: Replicate electron artifacts pipeline on flatpak's CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl committed Oct 15, 2024
1 parent 6e86b4f commit 95a1ca0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,26 +216,19 @@ jobs:
sudo flatpak remote-add --system flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --user flathub https://flathub.org/repo/flathub.flatpakrepo || true
- name: Set version as environment variable (others)
run: echo "VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_ENV

- name: Build electron
run: |
bun install --frozen-lockfile
bun run build
env DEBUG="@malept/flatpak-bundler" bun deploy:flatpak
- name: Build tag name
if: startsWith(github.ref, 'refs/tags/') && success()
run: |
mv dist/Cockpit*.flatpak dist/Cockpit-${{ matrix.suffix }}-$(git describe --tags --abbrev=0).flatpak
- name: Build name
if: "!startsWith(github.ref, 'refs/tags/') && success()"
run: |
mv dist/Cockpit*.flatpak dist/Cockpit-${{ matrix.suffix }}-$(git describe --tags).flatpak
env DEBUG="@malept/flatpak-bundler" bun run deploy:flatpak
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: cockpit-${{ matrix.suffix }}-flatpak
name: Cockpit-${{ matrix.suffix }}-${{ env.VERSION }}.flatpak
path: dist/Cockpit*.flatpak
if-no-files-found: error

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 --linux flatpak",
"deploy:flatpak": "ELECTRON=true electron-builder --x64 --publish=never --linux flatpak -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 95a1ca0

Please sign in to comment.