Release to GitHub #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to GitHub | |
on: | |
workflow_dispatch: | |
inputs: | |
run_id: | |
description: 'The workflow id where the artifacts were uploaded' | |
required: true | |
type: string | |
tag: | |
description: 'Tag to be used (e.g. v8.8.8)' | |
required: true | |
type: string | |
jobs: | |
release: | |
runs-on: ['ubuntu-latest'] | |
steps: | |
- name: Download artifacts | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
run_id: ${{ inputs.run_id }} | |
- name: Merge latest-mac.yml | |
run: | | |
ls -R | |
mv nrfconnect-macOS-x64/latest-mac-x64.yml nrfconnect-macOS-arm64/ | |
cd nrfconnect-macOS-arm64 | |
yq eval-all '(select(fileIndex == 0).files as $x) | (select(fileIndex == 1).files) += $x' latest-mac-arm64.yml latest-mac-x64.yml | awk '/---/ {p = !p; next} p' > latest-mac.yml | |
rm latest-mac-x64.yml latest-mac-arm64.yml | |
- name: Create Release | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: false | |
artifacts: 'nrfconnect-*/*.AppImage,nrfconnect-*/*.exe,nrfconnect-*/*.dmg,nrfconnect-*/*.zip,nrfconnect-*/latest*.yml' | |
tag: ${{ inputs.tag }} | |
draft: true |