Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/actions/dotnet/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ⚙ dotnet
description: Configures dotnet if the repo/org defines the DOTNET custom property

runs:
using: composite
steps:
- name: 🔎 dotnet
id: dotnet
shell: bash
run: |
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<<EOF'
echo "$NEWLINE_VERSIONS"
echo 'EOF'
} >> $GITHUB_OUTPUT

- name: ⚙ versions
if: steps.dotnet.outputs.versions != ''
shell: bash
run: |
echo "Versions:"
echo "${{ steps.dotnet.outputs.versions }}"

- name: ⚙ dotnet
if: steps.dotnet.outputs.versions != ''
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
${{ steps.dotnet.outputs.versions }}
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ updates:
ProtoBuf:
patterns:
- "protobuf-*"
Spectre:
patterns:
- "Spectre.Console*"
16 changes: 10 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MSBUILDTERMINALLOGGER: auto
Configuration: ${{ github.event.inputs.configuration || 'Release' }}
SLEET_FEED_URL: ${{ vars.SLEET_FEED_URL }}

defaults:
run:
Expand Down Expand Up @@ -65,12 +66,7 @@ jobs:
fetch-depth: 0

- name: ⚙ dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
8.x
9.x
uses: ./.github/actions/dotnet

- name: 🙏 build
run: dotnet build -m:1 -bl:build.binlog
Expand Down Expand Up @@ -104,6 +100,14 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: ⚙ dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
8.x
9.x

- name: ✓ ensure format
run: |
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/dotnet-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@ env:

jobs:
run:
permissions:
contents: write
uses: devlooped/oss/.github/workflows/dotnet-file-core.yml@main
secrets: inherit
secrets:
BOT_NAME: ${{ secrets.BOT_NAME }}
BOT_EMAIL: ${{ secrets.BOT_EMAIL }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
10 changes: 3 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ env:
VersionLabel: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MSBUILDTERMINALLOGGER: auto

SLEET_FEED_URL: https://api.nuget.org/v3/index.json

jobs:
publish:
runs-on: ${{ vars.PUBLISH_AGENT || 'ubuntu-latest' }}
Expand All @@ -27,12 +28,7 @@ jobs:
fetch-depth: 0

- name: ⚙ dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
8.x
9.x
uses: ./.github/actions/dotnet

- name: 🙏 build
run: dotnet build -m:1 -bl:build.binlog
Expand Down
21 changes: 13 additions & 8 deletions .netconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
weak
[file ".github/dependabot.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/dependabot.yml
sha = 49661dbf0720cde93eb5569be7523b5912351560
etag = c147ea2f3431ca0338c315c4a45b56ee233c4d30f8d6ab698d0e1980a257fd6a
sha = 917ff5486e25bec90038e7ab6d146fd82c61f846
etag = 50bf50df5a6eeb1705baea50f4c6e06d167a89cb5a590887ff939bd4120bd442
weak
[file ".github/workflows/build.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
sha = 06e898ccba692566ebf845fa7c8833ac6c318c0a
etag = 0a4b3f0a875cd8c9434742b4046558aecf610d3fa3d490cfd2099266e95e9195
sha = 08c70776943839f73dbea2e65355108747468508
etag = fb2e91cdc9fb7a4d3e8f698e525816c5d8febb35b005c278eecca8056e78f809
weak
[file ".github/workflows/changelog.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.yml
Expand All @@ -48,13 +48,13 @@
weak
[file ".github/workflows/dotnet-file.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file.yml
sha = 59aaf432369b5ea597831d4feec5a6ac4024c2e3
etag = 1374e3f8c9b7af69c443605c03f7262300dcb7d783738d9eb9fe84268ed2d10c
sha = 8fa147d4799d73819040736c399d0b1db2c2d86c
etag = 1ca805a23656e99c03f9d478dba8ccef6e571f5de2ac0e9bb7e3c5216c99a694
weak
[file ".github/workflows/publish.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
sha = 06e898ccba692566ebf845fa7c8833ac6c318c0a
etag = 2f64f75ad01f735fd05290370fb8a826111ac8dd7e74ce04226bb627a54a62ba
sha = 08c70776943839f73dbea2e65355108747468508
etag = 722a2c7cb3a42bc24ca7fb48d2e9a336641ed0599418239e24efbafccf64bd50
weak
[file ".gitignore"]
url = https://github.com/devlooped/oss/blob/main/.gitignore
Expand Down Expand Up @@ -422,3 +422,8 @@
sha = 33000c0c4ab4eb4e0e142fa54515b811a189d55c
etag = 013a47739e348f06891f37c45164478cca149854e6cd5c5158e6f073f852b61a
weak
[file ".github/actions/dotnet/action.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/actions/dotnet/action.yml
sha = 08c70776943839f73dbea2e65355108747468508
etag = a5f1fa7f652cc2c2e13b7c236e5f8403aea26667d6a040c84ef976af267af6ab
weak
Loading