Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
refactor: only run version determination once
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Jun 17, 2021
1 parent 3d6cc61 commit 8e67bef
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8e67bef

Please sign in to comment.