mirror of
https://github.com/rancher-sandbox/rancher-desktop.git
synced 2021-10-13 00:04:06 +03:00
This commit adds RPM and DEB targets to the electron builder manifest and uploads the result within the packaging workflow. Signed-off-by: David Cassany <dcassany@suse.com>
111 lines
3.1 KiB
YAML
111 lines
3.1 KiB
YAML
name: Package
|
|
|
|
on:
|
|
pull_request: {}
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- '*'
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
package:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- macos-10.15
|
|
- windows-2019
|
|
- ubuntu-latest
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
# Needed to run `git describe` to get full version info
|
|
fetch-depth: 0
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '14.x'
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '2.x'
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '^1.16'
|
|
- name: Install Windows dependencies
|
|
if: startsWith(matrix.os, 'windows-')
|
|
shell: powershell
|
|
run: .\scripts\windows-setup.ps1 -SkipVisualStudio -SkipTools
|
|
- name: Install Flatpak dependencies
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install flatpak flatpak-builder
|
|
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
- run: npm ci
|
|
- name: npm run build
|
|
run: |
|
|
case "${{ matrix.os }}" in
|
|
macos-*)
|
|
npm run build -- --mac --publish=never
|
|
;;
|
|
windows-*)
|
|
npm run build -- --win --publish=never
|
|
;;
|
|
ubuntu-*)
|
|
npm run build -- --linux --publish=never
|
|
;;
|
|
esac
|
|
- uses: actions/upload-artifact@v2
|
|
if: startsWith(matrix.os, 'macos-')
|
|
with:
|
|
name: Rancher Desktop.dmg
|
|
path: dist/Rancher Desktop*.dmg
|
|
if-no-files-found: error
|
|
- uses: actions/upload-artifact@v2
|
|
if: startsWith(matrix.os, 'macos-')
|
|
with:
|
|
name: Rancher Desktop-mac.zip
|
|
path: dist/Rancher Desktop*-mac.zip
|
|
if-no-files-found: error
|
|
- uses: actions/upload-artifact@v2
|
|
if: startsWith(matrix.os, 'windows-')
|
|
with:
|
|
name: Rancher Desktop Setup.exe
|
|
path: dist/Rancher Desktop*.exe
|
|
if-no-files-found: error
|
|
- uses: actions/upload-artifact@v2
|
|
if: startsWith(matrix.os, 'windows-')
|
|
with:
|
|
name: Rancher Desktop-win.zip
|
|
path: dist/Rancher Desktop-*-win.zip
|
|
if-no-files-found: error
|
|
- uses: actions/upload-artifact@v2
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
|
with:
|
|
name: Rancher Desktop-linux.tar.gz
|
|
path: dist/rancher-desktop*.tar.gz
|
|
if-no-files-found: error
|
|
- uses: actions/upload-artifact@v2
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
|
with:
|
|
name: Rancher Desktop.flatpak
|
|
path: dist/Rancher Desktop*.flatpak
|
|
if-no-files-found: error
|
|
- uses: actions/upload-artifact@v2
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
|
with:
|
|
name: Rancher Desktop.rpm
|
|
path: dist/rancher-desktop*.rpm
|
|
if-no-files-found: error
|
|
- uses: actions/upload-artifact@v2
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
|
with:
|
|
name: Rancher Desktop.deb
|
|
path: dist/rancher-desktop*.deb
|
|
if-no-files-found: error
|