Skip to content

Fix release workflow env #76

Fix release workflow env

Fix release workflow env #76

Workflow file for this run

name: CMake
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{matrix.os}}
env:
ARCHIVE_NAME: ${{github.event.repository.name}}-${{github.event.release.tag_name}}-${{runner.os}}-${{runner.arch}}.zip

Check failure on line 12 in .github/workflows/cmake.yml

View workflow run for this annotation

GitHub Actions / CMake

Invalid workflow file

The workflow is not valid. .github/workflows/cmake.yml (Line: 12, Col: 21): Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.os
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --parallel
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
run: ctest -C $BUILD_TYPE
- name: Archive
working-directory: ${{runner.workspace}}
shell: bash
run: 7z a -mx9 $ARCHIVE_NAME ./build/*
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: ${{runner.workspace}}/$ARCHIVE_NAME