Skip to content

Commit

Permalink
Introduced strategy for workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
smirko-dev committed Oct 3, 2021
1 parent 73645de commit 0d95d8a
Showing 1 changed file with 8 additions and 37 deletions.
45 changes: 8 additions & 37 deletions .github/workflows/FitbitBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ on:
workflow_dispatch:

jobs:
build-sdk4:
name: Build SDK4
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
sdk: ['sdk4', 'sdk5']

steps:
- name: Checkout branch
Expand All @@ -24,8 +27,8 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1

- name: Select SDK 4
run: cp package.sdk4.json package.json
- name: Select SDK
run: cp package.${{ matrix.sdk }}.json package.json

- name: Checkout Fitbit SDK
run: npm add --also=dev @fitbit/sdk
Expand All @@ -40,37 +43,5 @@ jobs:
uses: actions/upload-artifact@v2
if: ${{ success() }}
with:
path: build/app.fba
if-no-files-found: error

build-sdk5:
name: Build SDK5
runs-on: ubuntu-latest

steps:
- name: Checkout branch
uses: actions/checkout@v2
with:
lfs: true

- name: Setup node
uses: actions/setup-node@v1

- name: Select SDK 5
run: cp package.sdk5.json package.json

- name: Checkout Fitbit SDK
run: npm add --also=dev @fitbit/sdk

- name: Checkout Fitbit SDK-CLI
run: npm add --also=dev @fitbit/sdk-cli

- name: Run Build
run: npx fitbit-build --if-present

- name: Upload artifact
uses: actions/upload-artifact@v2
if: ${{ success() }}
with:
path: build/app.fba
path: build/${{ matrix.sdk }}/app.fba
if-no-files-found: error

0 comments on commit 0d95d8a

Please sign in to comment.