Release #16
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 | ||
on: | ||
release: | ||
types: [ "created" ] | ||
workflow_dispatch: | ||
inputs: | ||
host: | ||
description: 'Host to build for' | ||
required: true | ||
type: choice | ||
options: | ||
- 'macos-12' | ||
- 'macos-13-arm64' | ||
- 'debian-arm64-latest' | ||
permissions: | ||
contents: write | ||
env: | ||
BUILD_TYPE: Release | ||
LANG: 'en_US.UTF-8' | ||
jobs: | ||
release: | ||
name: Release for ${{ matrix.display-name }} | ||
strategy: | ||
matrix: | ||
include: | ||
- machine: 'macos-12' | ||
os: 'darwin' | ||
arch: 'x86_64' | ||
display-name: macOS x86_64 | ||
- machine: 'macos-13-arm64' | ||
os: 'darwin' | ||
arch: 'arm64' | ||
display-name: macOS ARM64 | ||
- machine: 'debian-arm64-latest' | ||
os: 'linux' | ||
arch: 'aarch64' | ||
display-name: Linux ARM64 | ||
runs-on: ${{ matrix.machine }} | ||
if: ${{ github.event.inputs.host == matrix.machine }} | ||
Check failure on line 43 in .github/workflows/release.yml GitHub Actions / ReleaseInvalid workflow file
|
||
env: | ||
ARTIFACT_NAME: arm-webos-linux-gnueabi_sdk-buildroot_${{matrix.os}}-${{matrix.arch}}.tar.bz2 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install GCC 12 (Linux) | ||
if: matrix.os == 'linux' | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y gcc-12 g++-12 | ||
- name: Set Parallel Level (macOS) | ||
if: matrix.os == 'darwin' | ||
run: echo "CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV | ||
- name: Set Parallel Level | ||
if: matrix.os == 'linux' | ||
run: echo "CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)" >> $GITHUB_ENV | ||
- name: Configure CMake | ||
run: | | ||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | ||
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/dist/arm-webos-linux-gnueabi_sdk-buildroot | ||
env: | ||
CC: 'gcc-12' | ||
CXX: 'g++-12' | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
- name: Install | ||
run: cmake --install ${{github.workspace}}/build | ||
- name: Make Tarball | ||
if: github.event_name == 'release' | ||
run: | | ||
cmake -E tar cjvf ${{env.ARTIFACT_NAME}} arm-webos-linux-gnueabi_sdk-buildroot | ||
working-directory: ${{github.workspace}}/build/dist | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
if: github.event_name == 'release' | ||
with: | ||
name: Release ${{ github.event.release.tag_name }} | ||
allowUpdates: true | ||
omitNameDuringUpdate: true | ||
omitBodyDuringUpdate: true | ||
omitPrereleaseDuringUpdate: true | ||
artifacts: ${{github.workspace}}/build/dist/${{env.ARTIFACT_NAME}} |