Skip to content

Commit 6299467

Browse files
committed
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Rename sample assemblies for nicer display devlooped/oss@93df7c7 - Add support and showcase determining install time devlooped/oss@717ddb1 - Make sure Funding class is available to intellisense devlooped/oss@5813f21 - Introduce lazy-init of sponsoring status, simplify diagnostics devlooped/oss@5009784 - Fix path to jwk.ps1 alongside the SponsorLink.targets devlooped/oss@c4830fc - Add our implementation of JWT manifest reading and reporting devlooped/oss@a0ae727 - Minimal docs on consuming devlooped/oss@827a1d1 - Make sure we report only once per product for entire solution devlooped/oss@4b7f922 - Update to newest JsonWebTokens devlooped/oss@068140b - Improve versioning of sample package devlooped/oss@3b943f5 - Add nullable and generated code annotations devlooped/oss@b2a11fa - Remove dependency on ThisAssembly devlooped/oss@c879f25 - Dynamically fetch devlooped JWK from github devlooped/oss@55124bc - Whitespace and formatting devlooped/oss@d74f511 - Replace JWT package in tests targets too devlooped/oss@ba1310c - Simplify and unify manifest reading implementation devlooped/oss@4fca946 - Fix formatting/whitespace devlooped/oss@7febebc - Remove unused tracing overloads devlooped/oss@08a8488 - Update to checkout@v4 devlooped/oss@5fb1723 - Cleanup build and publish to use VersionLabel devlooped/oss@14deaea
1 parent 714d162 commit 6299467

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2957
-63
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ on:
1717

1818
env:
1919
DOTNET_NOLOGO: true
20-
VersionPrefix: 42.42.${{ github.run_number }}
21-
VersionLabel: ${{ github.ref }}
2220
PackOnBuild: true
2321
GeneratePackageOnBuild: true
22+
VersionPrefix: 42.42.${{ github.run_number }}
23+
VersionLabel: ${{ github.ref }}
2424
GH_TOKEN: ${{ secrets.GH_TOKEN }}
2525

2626
defaults:
@@ -34,7 +34,7 @@ jobs:
3434
matrix: ${{ steps.lookup.outputs.matrix }}
3535
steps:
3636
- name: 🤘 checkout
37-
uses: actions/checkout@v2
37+
uses: actions/checkout@v4
3838

3939
- name: 🔎 lookup
4040
id: lookup
@@ -53,7 +53,7 @@ jobs:
5353
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
5454
steps:
5555
- name: 🤘 checkout
56-
uses: actions/checkout@v2
56+
uses: actions/checkout@v4
5757
with:
5858
submodules: recursive
5959
fetch-depth: 0
@@ -90,7 +90,7 @@ jobs:
9090
runs-on: ubuntu-latest
9191
steps:
9292
- name: 🤘 checkout
93-
uses: actions/checkout@v2
93+
uses: actions/checkout@v4
9494
with:
9595
submodules: recursive
9696
fetch-depth: 0

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
github_token: ${{ secrets.GITHUB_TOKEN }}
1818

1919
- name: 🤘 checkout
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323
ref: main

.github/workflows/dotnet-file.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ jobs:
2424
github_token: ${{ secrets.GITHUB_TOKEN }}
2525

2626
- name: 🤘 checkout
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@v4
2828
with:
2929
fetch-depth: 0
3030
ref: main
3131
token: ${{ env.GH_TOKEN }}
3232

3333
- name: ⌛ rate
3434
shell: pwsh
35+
if: github.event_name != 'workflow_dispatch'
3536
run: |
3637
# add random sleep since we run on fixed schedule
3738
sleep (get-random -max 60)
@@ -70,7 +71,7 @@ jobs:
7071
validate: false
7172

7273
- name: ✍ pull request
73-
uses: peter-evans/create-pull-request@v4
74+
uses: peter-evans/create-pull-request@v6
7475
with:
7576
base: main
7677
branch: dotnet-file-sync

.github/workflows/includes.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,17 @@ jobs:
2121
github_token: ${{ secrets.GITHUB_TOKEN }}
2222

2323
- name: 🤘 checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
2525
with:
2626
token: ${{ env.GH_TOKEN }}
2727

2828
- name: +Mᐁ includes
2929
uses: devlooped/actions-includes@v1
3030

3131
- name: ✍ pull request
32-
uses: peter-evans/create-pull-request@v4
32+
uses: peter-evans/create-pull-request@v6
3333
with:
34+
add-paths: '**/*.md'
3435
base: main
3536
branch: markdown-includes
3637
delete-branch: true

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@ env:
1212
Configuration: Release
1313
PackOnBuild: true
1414
GeneratePackageOnBuild: true
15+
VersionLabel: ${{ github.ref }}
1516
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1617

1718
jobs:
1819
publish:
1920
runs-on: ubuntu-latest
2021
steps:
2122
- name: 🤘 checkout
22-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2324
with:
2425
submodules: recursive
2526
fetch-depth: 0
2627

2728
- name: 🙏 build
28-
run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v} -bl:build.binlog
29+
run: dotnet build -m:1 -bl:build.binlog
2930

3031
- name: 🧪 test
3132
uses: ./.github/workflows/test

.github/workflows/sponsor.yml

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,58 @@ jobs:
99
sponsor:
1010
runs-on: ubuntu-latest
1111
continue-on-error: true
12-
env:
13-
token: ${{ secrets.GH_TOKEN }}
14-
if: ${{ !endsWith(github.event.sender.login, '[bot]') && !endsWith(github.event.sender.login, 'bot') }}
12+
if: ${{ !endsWith(github.event.sender.login, '[bot]') && github.event.sender.login != github.repository_owner }}
1513
steps:
1614
- name: 🤘 checkout
17-
if: env.token != ''
18-
uses: actions/checkout@v2
19-
15+
uses: actions/checkout@v4
16+
17+
- name: ⚙ install
18+
run: dotnet tool update -g dotnet-sponsor --prerelease
19+
20+
- name: 💻 setup
21+
run: |
22+
sponsor --version
23+
pushd ~
24+
git config -f .sponsorlink/.netconfig sponsorlink.id devlooped.sponsors.ci
25+
26+
- name: 🧪 run
27+
shell: pwsh
28+
env:
29+
SPONSORABLE: ${{ secrets.GITHUB_TOKEN }}
30+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: |
32+
$env:TOKEN | sponsor sync $env:SPONSORABLE --tos --with-token
33+
if ($LASTEXITCODE -eq -5) {
34+
throw "Can not determine sponsorship with the provided token"
35+
} elseif ($LASTEXITCODE -eq -6) {
36+
Write-Output "User is not sponsoring, skipping"
37+
exit 0
38+
} elseif ($LASTEXITCODE -eq -3) {
39+
Write-Output "$env:SPONSORABLE is not set up for SponsorLink"
40+
exit 0
41+
} elseif ($LASTEXITCODE -eq -4) {
42+
Write-Output "$env:SPONSORABLE SponsorLink manifest is invalid"
43+
exit 0
44+
} elseif ($LASTEXITCODE -ne -0) {
45+
Write-Output "Could not determine sponsor status"
46+
exit $LASTEXITCODE
47+
}
48+
49+
$roles = cat ~/.sponsorlink/github/$env:SPONSORABLE.jwt | jq -R 'split(".") | .[1] | @base64d | fromjson | .roles[]'
50+
if (($roles | jq 'select(. == "team")' -r) -eq "team") {
51+
Write-Output "User is a team member, skipping"
52+
exit 0
53+
} elseif (($roles | jq 'select(. == "contrib")' -r) -eq "contrib") {
54+
Write-Output "User is a contributor!"
55+
} else {
56+
Write-Output "User is a sponsor"
57+
if (($roles | jq 'select(. == "org")' -r) -eq "org") {
58+
Write-Output " (indirectly as a sponsoring organization member)"
59+
} elseif (($roles | jq 'select(. == "user")' -r) -eq "user") {
60+
Write-Output " (as a direct sponsor)"
61+
}
62+
}
63+
2064
- name: 💜 sponsor
2165
if: env.token != ''
2266
uses: devlooped/actions-sponsor@main

.netconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,6 @@
109109
sha = 0683ee777d7d878d4bf013d7deea352685135a05
110110
etag = b8d789b5b6bea017cdcc8badcea888ad78de3e34298efca922054e9fb0e7b6b9
111111
weak
112-
[file "src/nuget.config"]
113-
url = https://github.com/devlooped/oss/blob/main/src/nuget.config
114-
sha = b2fa09bd9db6de89e37a8ba6705b5659e435dafd
115-
etag = eb2d09e546aa1e11c0b464d9ed6ab2d3c028a1d86c3ac40a318053625fb72819
116-
weak
117112
[file ".github/workflows/combine-prs.yml"]
118113
url = https://github.com/devlooped/oss/blob/main/.github/workflows/combine-prs.yml
119114
sha = c1610886eba42cb250e3894aed40c0a258cd383d

readme.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,12 @@ respectively.
271271
[![Kori Francis](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/kfrancis.png "Kori Francis")](https://github.com/kfrancis)
272272
[![Toni Wenzel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/twenzel.png "Toni Wenzel")](https://github.com/twenzel)
273273
[![Giorgi Dalakishvili](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Giorgi.png "Giorgi Dalakishvili")](https://github.com/Giorgi)
274-
[![Mike James](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MikeCodesDotNET.png "Mike James")](https://github.com/MikeCodesDotNET)
274+
[![Uno Platform](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/unoplatform.png "Uno Platform")](https://github.com/unoplatform)
275275
[![Dan Siegel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/dansiegel.png "Dan Siegel")](https://github.com/dansiegel)
276276
[![Reuben Swartz](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/rbnswartz.png "Reuben Swartz")](https://github.com/rbnswartz)
277277
[![Jacob Foshee](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jfoshee.png "Jacob Foshee")](https://github.com/jfoshee)
278278
[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Mrxx99.png "")](https://github.com/Mrxx99)
279279
[![Eric Johnson](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/eajhnsn1.png "Eric Johnson")](https://github.com/eajhnsn1)
280-
[![Norman Mackay](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/mackayn.png "Norman Mackay")](https://github.com/mackayn)
281-
[![Certify The Web](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/certifytheweb.png "Certify The Web")](https://github.com/certifytheweb)
282280
[![Ix Technologies B.V.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/IxTechnologies.png "Ix Technologies B.V.")](https://github.com/IxTechnologies)
283281
[![David JENNI](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/davidjenni.png "David JENNI")](https://github.com/davidjenni)
284282
[![Jonathan ](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Jonathan-Hickey.png "Jonathan ")](https://github.com/Jonathan-Hickey)
@@ -288,14 +286,14 @@ respectively.
288286
[![Seann Alexander](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/seanalexander.png "Seann Alexander")](https://github.com/seanalexander)
289287
[![Tino Hager](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tinohager.png "Tino Hager")](https://github.com/tinohager)
290288
[![Mark Seemann](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ploeh.png "Mark Seemann")](https://github.com/ploeh)
291-
[![Angelo Belchior](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/angelobelchior.png "Angelo Belchior")](https://github.com/angelobelchior)
292289
[![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png "Ken Bonny")](https://github.com/KenBonny)
293290
[![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png "Simon Cropp")](https://github.com/SimonCropp)
294291
[![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png "agileworks-eu")](https://github.com/agileworks-eu)
295292
[![sorahex](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sorahex.png "sorahex")](https://github.com/sorahex)
296293
[![Zheyu Shen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/arsdragonfly.png "Zheyu Shen")](https://github.com/arsdragonfly)
297294
[![Vezel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/vezel-dev.png "Vezel")](https://github.com/vezel-dev)
298-
[![Georg Jung](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/georg-jung.png "Georg Jung")](https://github.com/georg-jung)
295+
[![ChilliCream](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ChilliCream.png "ChilliCream")](https://github.com/ChilliCream)
296+
[![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png "4OTC")](https://github.com/4OTC)
299297
300298

301299
<!-- sponsors.md -->

src/Directory.Build.props

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646

4747
<PropertyGroup Label="Build">
4848
<Configuration Condition="'$(Configuration)' == '' and $(CI)">Release</Configuration>
49-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
50-
<GenerateDocumentationFile Condition="$(MSBuildProjectName.Contains('Tests'))">false</GenerateDocumentationFile>
5149
<LangVersion>Latest</LangVersion>
5250

5351
<!-- See https://docs.microsoft.com/en-us/dotnet/standard/assembly/reference-assemblies -->
@@ -118,6 +116,8 @@
118116

119117
<PropertyGroup Label="Version" Condition="$(VersionLabel) != ''">
120118
<_VersionLabel>$(VersionLabel.Replace('refs/heads/', ''))</_VersionLabel>
119+
<_VersionLabel>$(_VersionLabel.Replace('refs/tags/v', ''))</_VersionLabel>
120+
121121
<!-- For PRs, we just need a fixed package version numbered after the PR # itself, so remove the commits # at the end -->
122122
<_VersionLabel Condition="$(_VersionLabel.Contains('refs/pull/'))">$(VersionLabel.TrimEnd('.0123456789'))</_VersionLabel>
123123
<!-- Next replace the prefix for simply 'pr', so we end up with 'pr99/merge' by default -->
@@ -128,7 +128,9 @@
128128
<_VersionLabel>$(_VersionLabel.Replace('/', '-'))</_VersionLabel>
129129

130130
<!-- Set sanitized version to the actual version suffix used in build/pack -->
131-
<VersionSuffix>$(_VersionLabel)</VersionSuffix>
131+
<VersionSuffix Condition="!$(VersionLabel.Contains('refs/tags/'))">$(_VersionLabel)</VersionSuffix>
132+
<!-- Special case for tags, the label is actually the version. Backs compat since passed-in value overrides MSBuild-set one -->
133+
<Version Condition="$(VersionLabel.Contains('refs/tags/'))">$(_VersionLabel)</Version>
132134
</PropertyGroup>
133135

134136
<ItemGroup Label="ThisAssembly.Project">
@@ -142,6 +144,16 @@
142144
<ProjectProperty Include="PublicKeyToken" />
143145
</ItemGroup>
144146

147+
<ItemGroup Label="Throw">
148+
<Using Include="System.ArgumentException" Static="true" />
149+
<Using Include="System.ArgumentOutOfRangeException" Static="true" />
150+
<Using Include="System.ArgumentNullException" Static="true" />
151+
</ItemGroup>
152+
145153
<Import Project="Directory.props" Condition="Exists('Directory.props')"/>
146154
<Import Project="Directory.props.user" Condition="Exists('Directory.props.user')" />
155+
156+
<!-- Implemented by SDK in .targets, guaranteeing it's overwritten. Added here since we add a DependsOnTargets to it.
157+
Covers backwards compatiblity with non-SDK projects. -->
158+
<Target Name="InitializeSourceControlInformation" />
147159
</Project>

src/Directory.Build.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
<PropertyGroup Condition="'$(CI)' == 'true' and '$(Language)' == 'C#'">
55
<DefineConstants>CI;$(DefineConstants)</DefineConstants>
66
</PropertyGroup>
7+
8+
<PropertyGroup Label="Build">
9+
<!-- Tests projects don't need API docs, typically -->
10+
<GenerateDocumentationFile Condition="$(GenerateDocumentationFile) == '' and $(IsTestProject) == 'true'">false</GenerateDocumentationFile>
11+
<GenerateDocumentationFile Condition="$(GenerateDocumentationFile) == '' amd $(MSBuildProjectName.Contains('Tests'))">false</GenerateDocumentationFile>
12+
<GenerateDocumentationFile Condition="$(GenerateDocumentationFile) == ''">true</GenerateDocumentationFile>
13+
</PropertyGroup>
714

815
<PropertyGroup Condition="'$(IsPackable)' == ''">
916
<IsPackable Condition="'$(PackAsTool)' == 'true'">true</IsPackable>

0 commit comments

Comments
 (0)