Skip to content

Zephyr SDK 0.18.0-alpha2 #46

Zephyr SDK 0.18.0-alpha2

Zephyr SDK 0.18.0-alpha2 #46

Workflow file for this run

# 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:
group: zephyr-runner-v2-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@v4
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@v2
with:
files: |
assets/hosttools_*
- name: Upload release assets (Linux toolchains)
uses: softprops/action-gh-release@v2
with:
files: |
assets/toolchain_gnu_linux*
assets/toolchain_llvm_linux*
- name: Upload release assets (macOS toolchains)
uses: softprops/action-gh-release@v2
with:
files: |
assets/toolchain_gnu_macos*
assets/toolchain_llvm_macos*
- name: Upload release assets (Windows toolchains)
uses: softprops/action-gh-release@v2
with:
files: |
assets/toolchain_gnu_windows*
assets/toolchain_llvm_windows*
- name: Upload release assets (Distribution bundles)
uses: softprops/action-gh-release@v2
with:
files: |
assets/${{ env.BUNDLE_PREFIX }}-*
- name: Upload release assets (checksum)
uses: softprops/action-gh-release@v2
with:
files: |
md5.sum
sha256.sum