Zephyr SDK 0.16.4 #30
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
# Zephyr SDK Continuous Integration Workflow (Release) | |
name: Release | |
on: | |
release: | |
types: [ published ] | |
permissions: | |
contents: write | |
env: | |
BUNDLE_PREFIX: zephyr-sdk | |
jobs: | |
# Run main CI workflow | |
ci: | |
name: CI | |
uses: ./.github/workflows/ci.yml | |
secrets: | |
AWS_CACHE_SDK_ACCESS_KEY_ID: ${{ secrets.AWS_CACHE_SDK_ACCESS_KEY_ID }} | |
AWS_CACHE_SDK_SECRET_ACCESS_KEY: ${{ secrets.AWS_CACHE_SDK_SECRET_ACCESS_KEY }} | |
# Publish release assets | |
release: | |
name: Release | |
needs: [ ci ] | |
runs-on: zephyr-runner-linux-x64-4xlarge | |
steps: | |
- name: Set up build environment | |
run: | | |
# Clean up working directories | |
rm -rf ${GITHUB_WORKSPACE}/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Prepare release assets | |
run: | | |
# Set base environment variables | |
ARTIFACT_ROOT=${GITHUB_WORKSPACE}/artifacts | |
ASSET_ROOT=${GITHUB_WORKSPACE}/assets | |
VERSION=$(<${ARTIFACT_ROOT}/version/version) | |
# Collect release assets | |
mkdir -p ${ASSET_ROOT} | |
pushd ${ASSET_ROOT} | |
mv ${ARTIFACT_ROOT}/toolchain_*/toolchain_* . | |
mv ${ARTIFACT_ROOT}/hosttools_*/hosttools_* . | |
mv ${ARTIFACT_ROOT}/${{ env.BUNDLE_PREFIX }}-*/${{ env.BUNDLE_PREFIX }}-* . | |
# Compute checksum | |
md5sum * > ${GITHUB_WORKSPACE}/md5.sum | |
sha256sum * > ${GITHUB_WORKSPACE}/sha256.sum | |
popd | |
# NOTE: The release asset upload action is called in multiple parts because the | |
# 'action-gh-release' action attempts to load all specified release assets | |
# into the runner memory at once and this may cause the runner instance to | |
# run out of memory (see the GitHub issue #520). | |
- name: Upload release assets (host tools) | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
assets/hosttools_* | |
- name: Upload release assets (Linux toolchains) | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
assets/toolchain_linux* | |
- name: Upload release assets (macOS toolchains) | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
assets/toolchain_macos* | |
- name: Upload release assets (Windows toolchains) | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
assets/toolchain_windows* | |
- name: Upload release assets (Distribution bundles) | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
assets/${{ env.BUNDLE_PREFIX }}-* | |
- name: Upload release assets (checksum) | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
md5.sum | |
sha256.sum |