Skip to content

Commit 6080f8c

Browse files
committed
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Fix condition check for sender != owner devlooped/oss@49f34c0 - Try using dotnet-sponsor CLI for checks devlooped/oss@e04e3e0 - Improve default value for GenerateDocumentationFile devlooped/oss@b76de49
1 parent ed6a6e2 commit 6080f8c

File tree

4 files changed

+105
-8
lines changed

4 files changed

+105
-8
lines changed

.github/workflows/sponsor.yml

Lines changed: 49 additions & 5 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.DEVLOOPED_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 != ''
1815
uses: actions/checkout@v4
19-
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

readme.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,52 @@ dotnet tool update -g dotnet-trx
3939
```
4040

4141
<!-- #content -->
42-
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
42+
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
43+
# Sponsors
44+
45+
<!-- sponsors.md -->
46+
[![Clarius Org](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png "Clarius Org")](https://github.com/clarius)
47+
[![Kirill Osenkov](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KirillOsenkov.png "Kirill Osenkov")](https://github.com/KirillOsenkov)
48+
[![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)
49+
[![Stephen Shaw](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/decriptor.png "Stephen Shaw")](https://github.com/decriptor)
50+
[![Torutek](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek-gh.png "Torutek")](https://github.com/torutek-gh)
51+
[![DRIVE.NET, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/drivenet.png "DRIVE.NET, Inc.")](https://github.com/drivenet)
52+
[![Ashley Medway](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/AshleyMedway.png "Ashley Medway")](https://github.com/AshleyMedway)
53+
[![Keith Pickford](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Keflon.png "Keith Pickford")](https://github.com/Keflon)
54+
[![Thomas Bolon](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tbolon.png "Thomas Bolon")](https://github.com/tbolon)
55+
[![Kori Francis](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/kfrancis.png "Kori Francis")](https://github.com/kfrancis)
56+
[![Toni Wenzel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/twenzel.png "Toni Wenzel")](https://github.com/twenzel)
57+
[![Giorgi Dalakishvili](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Giorgi.png "Giorgi Dalakishvili")](https://github.com/Giorgi)
58+
[![Uno Platform](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/unoplatform.png "Uno Platform")](https://github.com/unoplatform)
59+
[![Dan Siegel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/dansiegel.png "Dan Siegel")](https://github.com/dansiegel)
60+
[![Reuben Swartz](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/rbnswartz.png "Reuben Swartz")](https://github.com/rbnswartz)
61+
[![Jacob Foshee](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jfoshee.png "Jacob Foshee")](https://github.com/jfoshee)
62+
[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Mrxx99.png "")](https://github.com/Mrxx99)
63+
[![Eric Johnson](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/eajhnsn1.png "Eric Johnson")](https://github.com/eajhnsn1)
64+
[![Ix Technologies B.V.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/IxTechnologies.png "Ix Technologies B.V.")](https://github.com/IxTechnologies)
65+
[![David JENNI](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/davidjenni.png "David JENNI")](https://github.com/davidjenni)
66+
[![Jonathan ](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Jonathan-Hickey.png "Jonathan ")](https://github.com/Jonathan-Hickey)
67+
[![Oleg Kyrylchuk](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/okyrylchuk.png "Oleg Kyrylchuk")](https://github.com/okyrylchuk)
68+
[![Charley Wu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/akunzai.png "Charley Wu")](https://github.com/akunzai)
69+
[![Jakob Tikjøb Andersen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jakobt.png "Jakob Tikjøb Andersen")](https://github.com/jakobt)
70+
[![Seann Alexander](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/seanalexander.png "Seann Alexander")](https://github.com/seanalexander)
71+
[![Tino Hager](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tinohager.png "Tino Hager")](https://github.com/tinohager)
72+
[![Mark Seemann](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ploeh.png "Mark Seemann")](https://github.com/ploeh)
73+
[![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png "Ken Bonny")](https://github.com/KenBonny)
74+
[![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png "Simon Cropp")](https://github.com/SimonCropp)
75+
[![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png "agileworks-eu")](https://github.com/agileworks-eu)
76+
[![sorahex](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sorahex.png "sorahex")](https://github.com/sorahex)
77+
[![Zheyu Shen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/arsdragonfly.png "Zheyu Shen")](https://github.com/arsdragonfly)
78+
[![Vezel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/vezel-dev.png "Vezel")](https://github.com/vezel-dev)
79+
[![ChilliCream](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ChilliCream.png "ChilliCream")](https://github.com/ChilliCream)
80+
[![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png "4OTC")](https://github.com/4OTC)
81+
82+
83+
<!-- sponsors.md -->
84+
85+
[![Sponsor this project](https://raw.githubusercontent.com/devlooped/sponsors/main/sponsor.png "Sponsor this project")](https://github.com/sponsors/devlooped)
86+
&nbsp;
87+
88+
[Learn more about GitHub Sponsors](https://github.com/sponsors)
89+
90+
<!-- https://github.com/devlooped/sponsors/raw/main/footer.md -->

src/Directory.Build.props

Lines changed: 0 additions & 2 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 -->

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)