Skip to content
Open
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
95 changes: 95 additions & 0 deletions .github/workflows/dotnet-file-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Synchronizes .netconfig-configured files with dotnet-file
name: dotnet-file-core
on:
workflow_call:
secrets:
BOT_NAME:
required: false
BOT_EMAIL:
required: false
GH_TOKEN:
required: false

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<<EOF' >> $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 }}
24 changes: 22 additions & 2 deletions .netconfig
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
weak
[file "src/Directory.Build.props"]
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
sha = 95b338b9780de6b8ed11f060fed2d300f136ec60
etag = 5e73ffebd7aef6fecae5a73d4fb044bf46f3a593ee2858ff1648d9c337e546ad
sha = 0ff8b7b79a82112678326d1dc5543ed890311366
etag = 3ebde0a8630d526b80f15801179116e17a857ff880a4442e7db7b075efa4fd63
weak
[file "src/Directory.Build.targets"]
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
Expand Down Expand Up @@ -148,3 +148,23 @@
sha = 666a2a7c315f72199c418f11482a950fc69a8901
etag = 91ea15c07bfd784036c6ca931f5b2df7e9767b8367146d96c79caef09d63899f
weak
[file ".github/actions/dotnet/action.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/actions/dotnet/action.yml
sha = f2b690ce307acb76c5b8d7faec1a5b971a93653e
etag = 27ea11baa2397b3ec9e643a935832da97719c4e44215cfd135c49cad4c29373f
weak
[file ".github/workflows/dotnet-file-core.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file-core.yml
sha = af171b7a87382ee665ba6fbaeb5f38a3551e1c23
etag = 5ce370f52933ab2a4cd50f2b410e842fc5eab23088db2bf98b6c4d4ccdc9022b
weak
[file ".github/workflows/triage.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/triage.yml
sha = 33000c0c4ab4eb4e0e142fa54515b811a189d55c
etag = 013a47739e348f06891f37c45164478cca149854e6cd5c5158e6f073f852b61a
weak
[file "src/nuget.config"]
url = https://github.com/devlooped/oss/blob/main/src/nuget.config
sha = 032439dbf180fca0539a5bd3a019f18ab3484b76
etag = da7c0104131bd474b52fc9bc9f9bda6470e24ae38d4fb9f5c4f719bc01370ab5
weak
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ The versioning scheme for packages is:
<!-- sponsors.md -->
[![Clarius Org](https://avatars.githubusercontent.com/u/71888636?v=4&s=39 "Clarius Org")](https://github.com/clarius)
[![MFB Technologies, Inc.](https://avatars.githubusercontent.com/u/87181630?v=4&s=39 "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc)
[![SandRock](https://avatars.githubusercontent.com/u/321868?u=99e50a714276c43ae820632f1da88cb71632ec97&v=4&s=39 "SandRock")](https://github.com/sandrock)
[![DRIVE.NET, Inc.](https://avatars.githubusercontent.com/u/15047123?v=4&s=39 "DRIVE.NET, Inc.")](https://github.com/drivenet)
[![Keith Pickford](https://avatars.githubusercontent.com/u/16598898?u=64416b80caf7092a885f60bb31612270bffc9598&v=4&s=39 "Keith Pickford")](https://github.com/Keflon)
[![Thomas Bolon](https://avatars.githubusercontent.com/u/127185?u=7f50babfc888675e37feb80851a4e9708f573386&v=4&s=39 "Thomas Bolon")](https://github.com/tbolon)
Expand All @@ -369,8 +370,11 @@ The versioning scheme for packages is:
[![Justin Wendlandt](https://avatars.githubusercontent.com/u/1068431?u=f7715ed6a8bf926d96ec286f0f1c65f94bf86928&v=4&s=39 "Justin Wendlandt")](https://github.com/jwendl)
[![Adrian Alonso](https://avatars.githubusercontent.com/u/2027083?u=129cf516d99f5cb2fd0f4a0787a069f3446b7522&v=4&s=39 "Adrian Alonso")](https://github.com/adalon)
[![Michael Hagedorn](https://avatars.githubusercontent.com/u/61711586?u=8f653dfcb641e8c18cc5f78692ebc6bb3a0c92be&v=4&s=39 "Michael Hagedorn")](https://github.com/Eule02)
[![](https://avatars.githubusercontent.com/devlooped-user?s=39 "")](https://github.com/henkmartijn)
[![torutek](https://avatars.githubusercontent.com/u/33917059?v=4&s=39 "torutek")](https://github.com/torutek)
[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=739e110e62a75870c981640447efa5eb2cb3bc8f&v=4&s=39 "mccaffers")](https://github.com/mccaffers)
[![Christoph Hochstätter](https://avatars.githubusercontent.com/u/17645550?u=01bbdcb84d03cac26260f1c951e046d24a324591&v=4&s=39 "Christoph Hochstätter")](https://github.com/christoh)
[![ADS Fund](https://avatars.githubusercontent.com/u/202042116?v=4&s=39 "ADS Fund")](https://github.com/ADS-Fund)


<!-- sponsors.md -->
Expand Down
13 changes: 12 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project>
<Project TreatAsLocalProperty="VersionPrefix">
<!-- To extend/change the defaults, create a Directory.props alongside this file -->

<PropertyGroup Label="CI" Condition="'$(CI)' == ''">
Expand Down Expand Up @@ -45,6 +45,8 @@
<GeneratePathProperty>true</GeneratePathProperty>
<!-- Avoid warnings for test projects when we run dotnet pack on the whole solution. -->
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
<!-- See https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#prunepackagereference-specification -->
<RestoreEnablePackagePruning>true</RestoreEnablePackagePruning>
</PropertyGroup>

<PropertyGroup Label="Build">
Expand Down Expand Up @@ -136,6 +138,15 @@
<VersionSuffix Condition="!$(VersionLabel.Contains('refs/tags/'))">$(_VersionLabel)</VersionSuffix>
<!-- Special case for tags, the label is actually the version. Backs compat since passed-in value overrides MSBuild-set one -->
<Version Condition="$(VersionLabel.Contains('refs/tags/'))">$(_VersionLabel)</Version>

<!-- In order for latest from main/master to always be greatest when using -prerelease switch on install/run,
we change the scheme as follows:
- main/master remain as today: VersionPrefix: 42.42.${{ github.run_number }} (from yaml)
- others: VersionPrefix: 42.42.0-[label].${{ github.run_number }}
-->
<IsMaster Condition="$(VersionLabel.Contains('refs/heads/main')) or $(VersionLabel.Contains('refs/heads/master'))">true</IsMaster>
<VersionPrefix Condition="'$(IsMaster)' != 'true'">42.42.0</VersionPrefix>
<VersionSuffix Condition="'$(IsMaster)' != 'true'">$(VersionSuffix).$(GITHUB_RUN_NUMBER)</VersionSuffix>
</PropertyGroup>

<ItemGroup Label="ThisAssembly.Project">
Expand Down