diff --git a/.github/workflows/FitbitBuild.yml b/.github/workflows/FitbitBuild.yml index 2643234..00ebc8f 100644 --- a/.github/workflows/FitbitBuild.yml +++ b/.github/workflows/FitbitBuild.yml @@ -11,9 +11,12 @@ on: workflow_dispatch: jobs: - build-sdk4: - name: Build SDK4 + build: + name: Fitbit Build runs-on: ubuntu-latest + strategy: + matrix: + sdk: ['sdk4', 'sdk5'] steps: - name: Checkout branch @@ -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 @@ -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