From 8e67bef29a8061a2fb5e26dc55a3fbe28abed42b Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Thu, 17 Jun 2021 12:03:53 +0200 Subject: [PATCH] refactor: only run version determination once --- .github/workflows/build-and-release.yaml | 27 ++++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-and-release.yaml b/.github/workflows/build-and-release.yaml index 8f6899fa..4dab2838 100644 --- a/.github/workflows/build-and-release.yaml +++ b/.github/workflows/build-and-release.yaml @@ -104,16 +104,11 @@ jobs: tags: ${{ env.DOCKER_IMAGE }} push: true - build: + release-version: runs-on: ubuntu-latest - needs: [broker, docker] - - strategy: - matrix: - board: [thingy91_nrf9160ns, nrf9160dk_nrf9160ns] - network: [nbiot, ltem] - loglevel: [debug, nodebug] + outputs: + nextRelease: ${{ steps.version.outputs.nextRelease }} steps: - uses: actions/checkout@v2 @@ -125,6 +120,20 @@ jobs: branch: saga defaultVersion: "0.0.0-development" + build: + runs-on: ubuntu-latest + + needs: [broker, docker, release-version] + + strategy: + matrix: + board: [thingy91_nrf9160ns, nrf9160dk_nrf9160ns] + network: [nbiot, ltem] + loglevel: [debug, nodebug] + + steps: + - uses: actions/checkout@v2 + - name: Disable nRF Connect for Cloud backend run: | sed -i 's/CONFIG_NRF_CLOUD/# CONFIG_NRF_CLOUD/' prj.conf @@ -139,7 +148,7 @@ jobs: - name: Configure Version run: | - APP_VERSION=${{ steps.version.outputs.nextRelease }}-${{ matrix.board }}-${{ matrix.network }}-${{ matrix.loglevel }} + APP_VERSION=${{ needs.release-version.outputs.nextRelease }}-${{ matrix.board }}-${{ matrix.network }}-${{ matrix.loglevel }} echo "CONFIG_ASSET_TRACKER_V2_APP_VERSION=\"${APP_VERSION}\"" >> prj.conf - name: Enable debug logs