mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-08 18:21:20 +00:00
Merge pull request #20 from threeal/use-github-output
Replace GitHub Env With GitHub Output
This commit is contained in:
commit
96983bc9db
@ -32,6 +32,7 @@ runs:
|
|||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Process inputs
|
- name: Process inputs
|
||||||
|
id: process_inputs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
ARGS="${{ inputs.source-dir }} -B ${{ inputs.build-dir }}"
|
ARGS="${{ inputs.source-dir }} -B ${{ inputs.build-dir }}"
|
||||||
@ -51,8 +52,8 @@ runs:
|
|||||||
if [ -n '${{ inputs.args }}' ]; then
|
if [ -n '${{ inputs.args }}' ]; then
|
||||||
ARGS="$ARGS ${{ inputs.args }}"
|
ARGS="$ARGS ${{ inputs.args }}"
|
||||||
fi
|
fi
|
||||||
echo "CMAKE_ARGS=${ARGS//[$'\t\r\n']}" >> $GITHUB_ENV
|
echo "cmake_args=${ARGS//[$'\t\r\n']}" >> $GITHUB_OUTPUT
|
||||||
echo "CMAKE_BUILD_ARGS=${BUILD_ARGS//[$'\t\r\n']}" >> $GITHUB_ENV
|
echo "cmake_build_args=${BUILD_ARGS//[$'\t\r\n']}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Install Ninja
|
- name: Install Ninja
|
||||||
if: ${{ inputs.generator == 'Ninja' }}
|
if: ${{ inputs.generator == 'Ninja' }}
|
||||||
@ -66,8 +67,8 @@ runs:
|
|||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake ${{ env.CMAKE_ARGS }}
|
run: cmake ${{ steps.process_inputs.outputs.cmake_args }}
|
||||||
|
|
||||||
- name: Build targets
|
- name: Build targets
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake ${{ env.CMAKE_BUILD_ARGS }}
|
run: cmake ${{ steps.process_inputs.outputs.cmake_build_args }}
|
||||||
|
Loading…
Reference in New Issue
Block a user