gh/workflow: Propagate dir across other uses

This commit is contained in:
lat9nq 2023-06-16 01:27:31 -04:00
parent 31063d1881
commit 9a8dba8d76

View File

@ -25,7 +25,9 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
echo "nx_tzdb_dir=$(grep NX_TZDB_DIR ${{github.workspace}}/build/CMakeCache.txt | sed 's/.*=//g')" > "$GITHUB_ENV"
- name: Build
# Build your program with the given configuration
@ -34,11 +36,11 @@ jobs:
- name: Package
run: |
mkdir -p ${{github.workspace}}/artifacts
cp -rv ${{github.workspace}}/build/nx ${{github.workspace}}/artifacts/
cp -rv ${{ env.nx_tzdb_dir }} ${{github.workspace}}/artifacts/
- name: Version
run: |
echo "nx_version=$(cat $(grep NX_TZDB_DIR ${{github.workspace}}/build/CMakeCache.txt | sed 's/.*=//g')/version.txt)" > "$GITHUB_ENV"
echo "nx_version=$(cat ${{ env.nx_tzdb_dir }}/version.txt)" > "$GITHUB_ENV"
- name: Upload
uses: actions/upload-artifact@v3