Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow: Add make release workflow #147

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/attach_release_assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Workflow that attaches additional assets to github release.
name: Attach Release Assets

on:
release:
types: [created]

jobs:
trigger-build:
uses: ./.github/workflows/build.yml

trigger-dfu-check:
uses: ./.github/workflows/dfu_check.yml

trigger-target-test:
uses: ./.github/workflows/on_target.yml

coderbyheart marked this conversation as resolved.
Show resolved Hide resolved
attach-assets:
runs-on: ubuntu-22.04
# Only make a release if the above jobs are passing
needs: [trigger-build, trigger-dfu-check, trigger-target-test]
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: firmware

- name: Deploy release to github
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: hello.nrfcloud.com-*.*
30 changes: 28 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build

on:
workflow_call:
push:
branches:
- main
Expand Down Expand Up @@ -33,6 +34,31 @@ jobs:
pip install -r nrf/scripts/requirements-build.txt

- name: Build firmware
working-directory: thingy91x-oob
working-directory: thingy91x-oob/app
run: |
west build -b thingy91x/nrf9151/ns -p

- name: Set VERSION
shell: bash
run: |
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV
fi


- name: Rename artifacts
working-directory: thingy91x-oob/app/build
run: |
west twister -T app -v --inline-logs --integration
cp merged.hex hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-debug-app.hex
cp app/zephyr/.config hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-debug-app.config
cp app/zephyr/zephyr.signed.bin hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-debug-app_update_signed.bin

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: firmware
if-no-files-found: error
path: |
thingy91x-oob/app/build/hello.nrfcloud.com-*.*
1 change: 1 addition & 0 deletions .github/workflows/dfu_check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: DFU image compatibility check

on:
workflow_call:
push:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/on_target.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: On_target

on:
workflow_call:
workflow_dispatch:
inputs:
run_test:
Expand Down Expand Up @@ -48,6 +49,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: oob-t91x-hex
if-no-files-found: error
path: thingy91x-oob/build/merged.hex

test:
Expand Down
Loading