Skip to content

Commit 8fce62d

Browse files
authored
Use matrix strategy
1 parent 2ec2061 commit 8fce62d

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,21 @@ on:
99
- cron: '0 0 1 * *'
1010

1111
jobs:
12-
appimage-x86_64:
13-
name: AppImage x86_64
12+
appimage:
13+
strategy:
14+
matrix:
15+
arch: ['x86_64', 'i386']
16+
17+
name: AppImage ${{ matrix.arch }}
1418
runs-on: ubuntu-18.04
1519
env:
16-
ARCH: x86_64
17-
steps:
18-
- uses: actions/checkout@v2
19-
with:
20-
submodules: recursive
21-
- name: Build AppImage
22-
run: bash -ex ci/build-appimage.sh
23-
- name: Archive artifacts
24-
uses: actions/upload-artifact@v2
25-
with:
26-
name: AppImage x86_64
27-
path: linuxdeploy-plugin-appimage*.AppImage*
28-
29-
appimage-i386:
30-
name: AppImage i386
31-
runs-on: ubuntu-18.04
32-
env:
33-
ARCH: i386
20+
ARCH: ${{ matrix.ARCH }}
3421
steps:
3522
- uses: actions/checkout@v2
3623
with:
3724
submodules: recursive
3825
- name: Install dependencies
26+
if: ${{ matrix.ARCH == 'i386' }}
3927
run: |
4028
sudo dpkg --add-architecture i386
4129
sudo apt-get update
@@ -45,14 +33,13 @@ jobs:
4533
- name: Archive artifacts
4634
uses: actions/upload-artifact@v2
4735
with:
48-
name: AppImage i386
36+
name: AppImage ${{ matrix.ARCH }}
4937
path: linuxdeploy-plugin-appimage*.AppImage*
5038

5139
upload:
5240
name: Create release and upload artifacts
5341
needs:
54-
- appimage-x86_64
55-
- appimage-i386
42+
- appimage
5643
runs-on: ubuntu-latest
5744
steps:
5845
- name: Download artifacts

0 commit comments

Comments
 (0)