diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a109549b..66530443 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,6 +64,14 @@ jobs: submodules: recursive fetch-depth: 0 + - name: βš™ dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 6.x + 8.x + 9.x + - name: πŸ™ build run: dotnet build -m:1 -bl:build.binlog @@ -73,7 +81,7 @@ jobs: dotnet retest -- --no-build - name: πŸ› logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: runner.debug && always() with: name: logs diff --git a/.github/workflows/dotnet-file-core.yml b/.github/workflows/dotnet-file-core.yml new file mode 100644 index 00000000..1230687d --- /dev/null +++ b/.github/workflows/dotnet-file-core.yml @@ -0,0 +1,88 @@ +# Synchronizes .netconfig-configured files with dotnet-file +name: dotnet-file-core +on: + workflow_call: + +env: + DOTNET_NOLOGO: true + +defaults: + run: + shell: pwsh + +jobs: + sync: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: πŸ€– defaults + uses: devlooped/actions-bot@v1 + with: + name: ${{ secrets.BOT_NAME }} + email: ${{ secrets.BOT_EMAIL }} + gh_token: ${{ secrets.GH_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: 🀘 checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: main + token: ${{ env.GH_TOKEN }} + + - name: βŒ› rate + if: github.event_name != 'workflow_dispatch' + run: | + # add random sleep since we run on fixed schedule + sleep (get-random -max 60) + # get currently authenticated user rate limit info + $rate = gh api rate_limit | convertfrom-json | select -expandproperty rate + # if we don't have at least 100 requests left, wait until reset + if ($rate.remaining -lt 10) { + $wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s)) + echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset" + sleep $wait + $rate = gh api rate_limit | convertfrom-json | select -expandproperty rate + echo "Rate limit has reset to $($rate.remaining) requests" + } + + - name: πŸ”„ sync + run: | + dotnet tool update -g dotnet-gcm + # store credentials in plaintext for linux compat + git config --local credential.credentialStore plaintext + dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN + gh auth status + + dotnet tool update -g dotnet-file + $changelog = "$([System.IO.Path]::GetTempPath())dotnet-file.md" + dotnet file sync -c:$changelog + if (test-path $changelog) { + echo 'CHANGES<> $env:GITHUB_ENV + cat $changelog >> $env:GITHUB_ENV + echo 'EOF' >> $env:GITHUB_ENV + cat $changelog + } else { + echo 'No changelog was generated' + } + + - name: +Mᐁ includes + uses: devlooped/actions-includes@v1 + with: + validate: false + + - name: ✍ pull request + uses: peter-evans/create-pull-request@v7 + with: + base: main + branch: dotnet-file-sync + delete-branch: true + labels: dependencies + author: ${{ env.BOT_AUTHOR }} + committer: ${{ env.BOT_AUTHOR }} + commit-message: ⬆️ Bump files with dotnet-file sync + + ${{ env.CHANGES }} + title: "⬆️ Bump files with dotnet-file sync" + body: ${{ env.CHANGES }} + token: ${{ env.GH_TOKEN }} diff --git a/.github/workflows/includes.yml b/.github/workflows/includes.yml index 15a781ed..d787ccb9 100644 --- a/.github/workflows/includes.yml +++ b/.github/workflows/includes.yml @@ -11,6 +11,9 @@ on: jobs: includes: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write steps: - name: πŸ€– defaults uses: devlooped/actions-bot@v1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ae4240f3..8b065d73 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,6 +26,14 @@ jobs: submodules: recursive fetch-depth: 0 + - name: βš™ dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 6.x + 8.x + 9.x + - name: πŸ™ build run: dotnet build -m:1 -bl:build.binlog @@ -35,7 +43,7 @@ jobs: dotnet retest -- --no-build - name: πŸ› logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: runner.debug && always() with: name: logs diff --git a/.netconfig b/.netconfig index 485a4212..7aaa0468 100644 --- a/.netconfig +++ b/.netconfig @@ -30,9 +30,9 @@ sha = 49661dbf0720cde93eb5569be7523b5912351560 [file ".github/workflows/build.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml - etag = f358acb1e45596bf0aad49996017da44939de30b805289c4ad205a7ccb6f99cb + etag = 0a4b3f0a875cd8c9434742b4046558aecf610d3fa3d490cfd2099266e95e9195 weak - sha = 5e17ad62ebb5241555a7a4d29e3ab15e5ba120d2 + sha = 06e898ccba692566ebf845fa7c8833ac6c318c0a [file ".gitignore"] url = https://github.com/devlooped/oss/blob/main/.gitignore etag = c449ec6f76803e1891357ca2b8b4fcb5b2e5deeff8311622fd92ca9fbf1e6575 @@ -86,13 +86,13 @@ sha = 5fb172362c767bef7c36478f1a6bdc264723f8f9 [file ".github/workflows/publish.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml - etag = 2cc96046d8f28e7cbcde89ed56d3d89e1a70fb0de7846ee1827bee66b7dfbcf1 + etag = 2f64f75ad01f735fd05290370fb8a826111ac8dd7e74ce04226bb627a54a62ba weak - sha = 5e17ad62ebb5241555a7a4d29e3ab15e5ba120d2 + sha = 06e898ccba692566ebf845fa7c8833ac6c318c0a [file ".github/workflows/dotnet-file.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file.yml - sha = 7afe350f7e80a230e922db026d4e1198ba15cae1 - etag = 65e9794df6caff779eb989c8f71ddf4d4109b24a75af79e4f8d0fe6ba7bd9702 + sha = 59aaf432369b5ea597831d4feec5a6ac4024c2e3 + etag = 1374e3f8c9b7af69c443605c03f7262300dcb7d783738d9eb9fe84268ed2d10c weak [file "src/nuget.config"] url = https://github.com/devlooped/oss/blob/main/src/nuget.config @@ -109,8 +109,8 @@ weak [file ".github/workflows/includes.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml - sha = d152e7437fd0d6f6d9363d23cb3b78c07335ea49 - etag = ec40db34f379d0c6d83b2ec15624f330318a172cc4f85b5417c63e86eaf601df + sha = 85829f2510f335f4a411867f3dbaaa116c3ab3de + etag = 086f6b6316cc6ea7089c0dcc6980be519e6ed6e6201e65042ef41b82634ec0ee weak [file ".github/workflows/combine-prs.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/combine-prs.yml @@ -379,3 +379,8 @@ sha = 4638da914b0527c156227f3705ca60a85c1871e4 etag = 6603b004f41e023d03b86f175d9fc4e0a462d1b2519406e46b4831e36c378e6f weak +[file ".github/workflows/dotnet-file-core.yml"] + url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file-core.yml + sha = 875284ba5d565f529aba2f5d24ab8ed27c1d1c79 + etag = 8de1d974bf73b1945b5c8be684c3a0b7364114a0d795c9d68837aed9b3aff331 + weak diff --git a/readme.md b/readme.md index 90a55939..7f20e892 100644 --- a/readme.md +++ b/readme.md @@ -569,7 +569,6 @@ The versioning scheme for packages is: [![Clarius Org](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png "Clarius Org")](https://github.com/clarius) -[![Kirill Osenkov](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KirillOsenkov.png "Kirill Osenkov")](https://github.com/KirillOsenkov) [![MFB Technologies, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MFB-Technologies-Inc.png "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc) [![Torutek](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek-gh.png "Torutek")](https://github.com/torutek-gh) [![DRIVE.NET, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/drivenet.png "DRIVE.NET, Inc.")](https://github.com/drivenet) @@ -589,7 +588,6 @@ The versioning scheme for packages is: [![Charley Wu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/akunzai.png "Charley Wu")](https://github.com/akunzai) [![Jakob TikjΓΈb Andersen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jakobt.png "Jakob TikjΓΈb Andersen")](https://github.com/jakobt) [![Tino Hager](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tinohager.png "Tino Hager")](https://github.com/tinohager) -[![Mark Seemann](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ploeh.png "Mark Seemann")](https://github.com/ploeh) [![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png "Ken Bonny")](https://github.com/KenBonny) [![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png "Simon Cropp")](https://github.com/SimonCropp) [![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png "agileworks-eu")](https://github.com/agileworks-eu)