diff --git a/.gitattributes b/.gitattributes index 4f89148..3095556 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,7 @@ # normalize by default * text=auto encoding=UTF-8 *.sh text eol=lf +*.sbn eol=lf # These are windows specific files which we may as well ensure are # always crlf on checkout diff --git a/.github/actions/dotnet/action.yml b/.github/actions/dotnet/action.yml index fa7957a..c876ae3 100644 --- a/.github/actions/dotnet/action.yml +++ b/.github/actions/dotnet/action.yml @@ -8,11 +8,28 @@ runs: id: dotnet shell: bash run: | - VERSIONS=$(gh api /repos/${{ github.repository }}/properties/values | jq -r '.[] | select(.property_name == "DOTNET") | .value') - echo "versions=$VERSIONS" >> $GITHUB_OUTPUT + VERSIONS=$(gh api repos/${{ github.repository }}/properties/values | jq -r '.[] | select(.property_name == "DOTNET") | .value') + # Remove extra whitespace from VERSIONS + VERSIONS=$(echo "$VERSIONS" | tr -s ' ' | tr -d ' ') + # Convert comma-separated to newline-separated + NEWLINE_VERSIONS=$(echo "$VERSIONS" | tr ',' '\n') + # Validate versions + while IFS= read -r version; do + if ! [[ $version =~ ^[0-9]+(\.[0-9]+(\.[0-9]+)?)?(\.x)?$ ]]; then + echo "Error: Invalid version format: $version" + exit 1 + fi + done <<< "$NEWLINE_VERSIONS" + # Write multiline output to $GITHUB_OUTPUT + { + echo 'versions<> $GITHUB_OUTPUT - name: ⚙ dotnet if: steps.dotnet.outputs.versions != '' uses: actions/setup-dotnet@v4 with: - dotnet-version: ${{ steps.dotnet.outputs.versions }} + dotnet-version: | + ${{ steps.dotnet.outputs.versions }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 564672f..0b126dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,7 @@ env: MSBUILDTERMINALLOGGER: auto Configuration: ${{ github.event.inputs.configuration || 'Release' }} SLEET_FEED_URL: ${{ vars.SLEET_FEED_URL }} + OPENAI__KEY: ${{ secrets.OPENAI__KEY }} defaults: run: @@ -86,7 +87,7 @@ jobs: - name: 🚀 sleet env: SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }} - if: env.SLEET_CONNECTION != '' + if: env.SLEET_CONNECTION != '' && env.SLEET_FEED_URL != '' run: | dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r) sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found" diff --git a/.netconfig b/.netconfig index 6418ef4..3b6edfa 100644 --- a/.netconfig +++ b/.netconfig @@ -23,15 +23,15 @@ weak [file ".gitattributes"] url = https://github.com/devlooped/oss/blob/main/.gitattributes - sha = 5f92a68e302bae675b394ef343114139c075993e + sha = 4a9aa321c4982b83c185cf8dffed181ff84667d5 - etag = 338ba6d92c8d1774363396739c2be4257bfc58026f4b0fe92cb0ae4460e1eff7 + etag = 09cad18280ed04b67f7f87591e5481510df04d44c3403231b8af885664d8fd58 weak [file ".github/actions/dotnet/action.yml"] url = https://github.com/devlooped/oss/blob/main/.github/actions/dotnet/action.yml - sha = 08c70776943839f73dbea2e65355108747468508 + sha = f2b690ce307acb76c5b8d7faec1a5b971a93653e - etag = a5f1fa7f652cc2c2e13b7c236e5f8403aea26667d6a040c84ef976af267af6ab + etag = 27ea11baa2397b3ec9e643a935832da97719c4e44215cfd135c49cad4c29373f weak [file ".github/dependabot.yml"] url = https://github.com/devlooped/oss/blob/main/.github/dependabot.yml