From 3a2b12d4c273ea128b604ecf9e34cca4fcf591d3 Mon Sep 17 00:00:00 2001 From: Andrew Cassidy Date: Sat, 21 Sep 2024 00:03:34 -0700 Subject: [PATCH] CI tweaks to address race condition --- .github/workflows/internal-ci.yml | 11 +++++++++++ .github/workflows/internal-test-plugin-nuget.yml | 12 ++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/internal-ci.yml b/.github/workflows/internal-ci.yml index c5a20a6..14d8105 100644 --- a/.github/workflows/internal-ci.yml +++ b/.github/workflows/internal-ci.yml @@ -20,6 +20,8 @@ jobs: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: true runs-on: ubuntu-latest + outputs: + package-version: ${{ steps.get-version.outputs.version }} steps: - uses: actions/checkout@v4 with: @@ -30,6 +32,13 @@ jobs: with: dotnet-version: 8.0.x + - name: Get Version + id: get-version + run: | + dotnet tool install --global minver-cli --version 5.0.0 + minver + echo "version=$(minver -v e)" >> "$GITHUB_OUTPUT" + - name: Build run: dotnet build KSPBuildTools.csproj @@ -48,6 +57,8 @@ jobs: test-plugin-nuget: uses: './.github/workflows/internal-test-plugin-nuget.yml' needs: [ build ] + with: + package-version: ${{ needs.build.outputs.package-version }} test-plugin-legacy: uses: './.github/workflows/internal-test-plugin-legacy.yml' diff --git a/.github/workflows/internal-test-plugin-nuget.yml b/.github/workflows/internal-test-plugin-nuget.yml index 6f5a4f1..30574c3 100644 --- a/.github/workflows/internal-test-plugin-nuget.yml +++ b/.github/workflows/internal-test-plugin-nuget.yml @@ -3,6 +3,10 @@ name: Test Plugin Mod (NuGet) on: workflow_call: + inputs: + package-version: + type: string + required: true env: TESTDIR: tests/plugin-mod-nuget @@ -21,12 +25,6 @@ jobs: with: dotnet-version: 8.0.x - - name: Get Version - run: | - dotnet tool install --global minver-cli --version 5.0.0 - minver - echo "KSPBuildToolsVersion=$(minver -v e)" >> "$GITHUB_ENV" - - name: Setup Nuget Package Sources run: | mkdir -p ${{ env.NuGetDirectory }}/local @@ -44,6 +42,8 @@ jobs: ksp-zip-url: https://github.com/KSPModdingLibs/KSPLibs/raw/main/KSP-1.12.5.zip working-directory: ${{ env.TESTDIR }} solution-file-path: plugin-mod.csproj + env: + KSPBuildToolsVersion: ${{ inputs.package-version }} - uses: ./.github/actions/assemble-release with: