Skip to content

Commit f6e8de1

Browse files
committed
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Switch back to latest stable includes devlooped/oss@875284b - Update nuget.config with new(ish?) MS certs devlooped/oss@032439d - Update dotnet-file.yml to latest pr action devlooped/oss@42704be - Switch to reusable workflow for dotnet-file devlooped/oss@f2e52f7 - Rename sync to run devlooped/oss@9d58f5c - Point to main for dotnet-file sync workflow devlooped/oss@59aaf43 - Update .gitignore to ignore .genaiscript devlooped/oss@e0be248 - Attempt to get necessary permissions for default token devlooped/oss@85829f2 - Don't copy default icon to output directory devlooped/oss@9263184 - Update typed resgen to opt-in only devlooped/oss@a8b2080 - Simplify .gitattributes devlooped/oss@5f92a68 - If we provide a docs category, don't exclude docs :) devlooped/oss@0c23e24
1 parent 4388c8f commit f6e8de1

File tree

9 files changed

+153
-114
lines changed

9 files changed

+153
-114
lines changed

.gitattributes

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
1-
# sln, csproj files (and friends) are always CRLF, even on linux
2-
*.sln text eol=crlf
3-
*.proj text eol=crlf
4-
*.csproj text eol=crlf
1+
# normalize by default
2+
* text=auto encoding=UTF-8
3+
*.sh text eol=lf
54

65
# These are windows specific files which we may as well ensure are
76
# always crlf on checkout
87
*.bat text eol=crlf
98
*.cmd text eol=crlf
10-
11-
# Opt in known filetypes to always normalize line endings on checkin
12-
# and always use native endings on checkout
13-
*.c text
14-
*.config text
15-
*.h text
16-
*.cs text
17-
*.md text
18-
*.tt text
19-
*.txt text
20-
21-
# Some must always be checked out as lf so enforce that for those files
22-
# If these are not lf then bash/cygwin on windows will not be able to
23-
# excute the files
24-
*.sh text eol=lf

.github/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ changelog:
88
- invalid
99
- wontfix
1010
- need info
11-
- docs
1211
- techdebt
1312
authors:
1413
- devlooped-bot
@@ -24,6 +23,7 @@ changelog:
2423
- title: 📝 Documentation updates
2524
labels:
2625
- docs
26+
- documentation
2727
- title: 🔨 Other
2828
labels:
2929
- '*'
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Synchronizes .netconfig-configured files with dotnet-file
2+
name: dotnet-file-core
3+
on:
4+
workflow_call:
5+
6+
env:
7+
DOTNET_NOLOGO: true
8+
9+
defaults:
10+
run:
11+
shell: pwsh
12+
13+
jobs:
14+
sync:
15+
runs-on: ubuntu-latest
16+
continue-on-error: true
17+
steps:
18+
- name: 🤖 defaults
19+
uses: devlooped/actions-bot@v1
20+
with:
21+
name: ${{ secrets.BOT_NAME }}
22+
email: ${{ secrets.BOT_EMAIL }}
23+
gh_token: ${{ secrets.GH_TOKEN }}
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: 🤘 checkout
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
ref: main
31+
token: ${{ env.GH_TOKEN }}
32+
33+
- name: ⌛ rate
34+
if: github.event_name != 'workflow_dispatch'
35+
run: |
36+
# add random sleep since we run on fixed schedule
37+
sleep (get-random -max 60)
38+
# get currently authenticated user rate limit info
39+
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
40+
# if we don't have at least 100 requests left, wait until reset
41+
if ($rate.remaining -lt 10) {
42+
$wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
43+
echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
44+
sleep $wait
45+
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
46+
echo "Rate limit has reset to $($rate.remaining) requests"
47+
}
48+
49+
- name: 🔄 sync
50+
run: |
51+
dotnet tool update -g dotnet-gcm
52+
# store credentials in plaintext for linux compat
53+
git config --local credential.credentialStore plaintext
54+
dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN
55+
gh auth status
56+
57+
dotnet tool update -g dotnet-file
58+
$changelog = "$([System.IO.Path]::GetTempPath())dotnet-file.md"
59+
dotnet file sync -c:$changelog
60+
if (test-path $changelog) {
61+
echo 'CHANGES<<EOF' >> $env:GITHUB_ENV
62+
cat $changelog >> $env:GITHUB_ENV
63+
echo 'EOF' >> $env:GITHUB_ENV
64+
cat $changelog
65+
} else {
66+
echo 'No changelog was generated'
67+
}
68+
69+
- name: +Mᐁ includes
70+
uses: devlooped/actions-includes@v1
71+
with:
72+
validate: false
73+
74+
- name: ✍ pull request
75+
uses: peter-evans/create-pull-request@v7
76+
with:
77+
base: main
78+
branch: dotnet-file-sync
79+
delete-branch: true
80+
labels: dependencies
81+
author: ${{ env.BOT_AUTHOR }}
82+
committer: ${{ env.BOT_AUTHOR }}
83+
commit-message: ⬆️ Bump files with dotnet-file sync
84+
85+
${{ env.CHANGES }}
86+
title: "⬆️ Bump files with dotnet-file sync"
87+
body: ${{ env.CHANGES }}
88+
token: ${{ env.GH_TOKEN }}

.github/workflows/dotnet-file.yml

Lines changed: 3 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -11,77 +11,6 @@ env:
1111
DOTNET_NOLOGO: true
1212

1313
jobs:
14-
sync:
15-
runs-on: windows-latest
16-
continue-on-error: true
17-
steps:
18-
- name: 🤖 defaults
19-
uses: devlooped/actions-bot@v1
20-
with:
21-
name: ${{ secrets.BOT_NAME }}
22-
email: ${{ secrets.BOT_EMAIL }}
23-
gh_token: ${{ secrets.GH_TOKEN }}
24-
github_token: ${{ secrets.GITHUB_TOKEN }}
25-
26-
- name: 🤘 checkout
27-
uses: actions/checkout@v4
28-
with:
29-
fetch-depth: 0
30-
ref: main
31-
token: ${{ env.GH_TOKEN }}
32-
33-
- name: ⌛ rate
34-
shell: pwsh
35-
if: github.event_name != 'workflow_dispatch'
36-
run: |
37-
# add random sleep since we run on fixed schedule
38-
sleep (get-random -max 60)
39-
# get currently authenticated user rate limit info
40-
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
41-
# if we don't have at least 100 requests left, wait until reset
42-
if ($rate.remaining -lt 10) {
43-
$wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
44-
echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
45-
sleep $wait
46-
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
47-
echo "Rate limit has reset to $($rate.remaining) requests"
48-
}
49-
50-
- name: 🔄 sync
51-
shell: pwsh
52-
run: |
53-
dotnet tool update -g dotnet-gcm
54-
dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN
55-
gh auth status
56-
57-
dotnet tool update -g dotnet-file
58-
dotnet file sync -c:$env:TEMP\dotnet-file.md
59-
if (test-path $env:TEMP\dotnet-file.md) {
60-
echo 'CHANGES<<EOF' >> $env:GITHUB_ENV
61-
cat $env:TEMP\dotnet-file.md >> $env:GITHUB_ENV
62-
echo 'EOF' >> $env:GITHUB_ENV
63-
cat $env:TEMP\dotnet-file.md
64-
} else {
65-
echo 'No changelog was generated'
66-
}
67-
68-
- name: +Mᐁ includes
69-
uses: devlooped/actions-include@v1
70-
with:
71-
validate: false
72-
73-
- name: ✍ pull request
74-
uses: peter-evans/create-pull-request@v6
75-
with:
76-
base: main
77-
branch: dotnet-file-sync
78-
delete-branch: true
79-
labels: dependencies
80-
author: ${{ env.BOT_AUTHOR }}
81-
committer: ${{ env.BOT_AUTHOR }}
82-
commit-message: ⬆️ Bump files with dotnet-file sync
83-
84-
${{ env.CHANGES }}
85-
title: "⬆️ Bump files with dotnet-file sync"
86-
body: ${{ env.CHANGES }}
87-
token: ${{ env.GH_TOKEN }}
14+
run:
15+
uses: devlooped/oss/.github/workflows/dotnet-file-core.yml@main
16+
secrets: inherit

.github/workflows/includes.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
jobs:
1212
includes:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
1417
steps:
1518
- name: 🤖 defaults
1619
uses: devlooped/actions-bot@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ BenchmarkDotNet.Artifacts
88
/app
99
.vs
1010
.vscode
11+
.genaiscript
1112
.idea
1213
local.settings.json
1314

.netconfig

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
weak
2020
[file ".gitattributes"]
2121
url = https://github.com/devlooped/oss/blob/main/.gitattributes
22-
sha = 0683ee777d7d878d4bf013d7deea352685135a05
23-
etag = 7acb32f5fa6d4ccd9c824605a7c2b8538497f0068c165567807d393dcf4d6bb7
22+
sha = 5f92a68e302bae675b394ef343114139c075993e
23+
etag = 338ba6d92c8d1774363396739c2be4257bfc58026f4b0fe92cb0ae4460e1eff7
2424
weak
2525
[file ".github/dependabot.yml"]
2626
url = https://github.com/devlooped/oss/blob/main/.github/dependabot.yml
@@ -29,8 +29,8 @@
2929
weak
3030
[file ".github/release.yml"]
3131
url = https://github.com/devlooped/oss/blob/main/.github/release.yml
32-
sha = 1afd173fe8f81b510c597737b0d271218e81fa73
33-
etag = 482dc2c892fc7ce0cb3a01eb5d9401bee50ddfb067d8cb85873555ce63cf5438
32+
sha = 0c23e24704625cf75b2cb1fdc566cef7e20af313
33+
etag = 310df162242c95ed19ed12e3c96a65f77e558b46dced676ad5255eb12caafe75
3434
weak
3535
[file ".github/workflows/build.yml"]
3636
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
@@ -47,13 +47,13 @@
4747
weak
4848
[file ".github/workflows/dotnet-file.yml"]
4949
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file.yml
50-
sha = 7afe350f7e80a230e922db026d4e1198ba15cae1
51-
etag = 65e9794df6caff779eb989c8f71ddf4d4109b24a75af79e4f8d0fe6ba7bd9702
50+
sha = 59aaf432369b5ea597831d4feec5a6ac4024c2e3
51+
etag = 1374e3f8c9b7af69c443605c03f7262300dcb7d783738d9eb9fe84268ed2d10c
5252
weak
5353
[file ".github/workflows/includes.yml"]
5454
url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml
55-
sha = d152e7437fd0d6f6d9363d23cb3b78c07335ea49
56-
etag = ec40db34f379d0c6d83b2ec15624f330318a172cc4f85b5417c63e86eaf601df
55+
sha = 85829f2510f335f4a411867f3dbaaa116c3ab3de
56+
etag = 086f6b6316cc6ea7089c0dcc6980be519e6ed6e6201e65042ef41b82634ec0ee
5757
weak
5858
[file ".github/workflows/publish.yml"]
5959
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
@@ -65,8 +65,8 @@
6565
weak
6666
[file ".gitignore"]
6767
url = https://github.com/devlooped/oss/blob/main/.gitignore
68-
sha = 02811fa23b0a102b9b33048335d41e515bf75737
69-
etag = a9c37ae312afac14b78436a7d018af4483d88736b5f780576f2c5a0b3f14998c
68+
sha = e0be248fff1d39133345283b8227372b36574b75
69+
etag = c449ec6f76803e1891357ca2b8b4fcb5b2e5deeff8311622fd92ca9fbf1e6575
7070
weak
7171
[file "Directory.Build.rsp"]
7272
url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp
@@ -95,6 +95,16 @@
9595
weak
9696
[file "src/Directory.Build.targets"]
9797
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
98-
sha = 33a20db26e47589769284817b271ce67ea9ccfd8
99-
etag = 1a3a0151b5771ee97ed8351254ff4c18a0ff568e0df5c33c6830f069bfbb067b
98+
sha = a8b208093599263b7f2d1fe3854634c588ea5199
99+
etag = 19087699f05396205e6b050d999a43b175bd242f6e8fac86f6df936310178b03
100+
weak
101+
[file ".github/workflows/dotnet-file-core.yml"]
102+
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file-core.yml
103+
sha = 875284ba5d565f529aba2f5d24ab8ed27c1d1c79
104+
etag = 8de1d974bf73b1945b5c8be684c3a0b7364114a0d795c9d68837aed9b3aff331
105+
weak
106+
[file "src/nuget.config"]
107+
url = https://github.com/devlooped/oss/blob/main/src/nuget.config
108+
sha = 032439dbf180fca0539a5bd3a019f18ab3484b76
109+
etag = da7c0104131bd474b52fc9bc9f9bda6470e24ae38d4fb9f5c4f719bc01370ab5
100110
weak

src/Directory.Build.targets

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,28 @@
3434

3535
<ItemGroup Condition="'$(IsPackable)' == 'true'" Label="NuGet">
3636
<!-- This is compatible with nugetizer and SDK pack -->
37+
<!-- Only difference is we don't copy either to output directory -->
3738

3839
<!-- Project-level icon/readme will already be part of None items -->
3940
<None Update="@(None -> WithMetadataValue('Filename', 'icon'))"
4041
Pack="true" PackagePath="%(Filename)%(Extension)"
42+
CopyToOutputDirectory="Never"
4143
Condition="'$(PackageIcon)' != ''" />
4244

4345
<None Update="@(None -> WithMetadataValue('Filename', 'readme'))"
4446
Pack="true" PackagePath="%(Filename)%(Extension)"
47+
CopyToOutputDirectory="Never"
4548
Condition="'$(PackReadme)' != 'false' and '$(PackageReadmeFile)' != ''" />
4649

4750
<!-- src-level will need explicit inclusion -->
4851
<None Include="$(MSBuildThisFileDirectory)icon.png" Link="icon.png" Visible="false"
4952
Pack="true" PackagePath="%(Filename)%(Extension)"
53+
CopyToOutputDirectory="Never"
5054
Condition="Exists('$(MSBuildThisFileDirectory)icon.png') and !Exists('$(MSBuildProjectDirectory)\icon.png')" />
5155

5256
<None Include="$(MSBuildThisFileDirectory)readme.md" Link="readme.md"
5357
Pack="true" PackagePath="%(Filename)%(Extension)"
58+
CopyToOutputDirectory="Never"
5459
Condition="'$(PackReadme)' != 'false' and Exists('$(MSBuildThisFileDirectory)readme.md') and !Exists('$(MSBuildProjectDirectory)\readme.md')" />
5560
</ItemGroup>
5661

@@ -101,19 +106,17 @@
101106
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(BUDDY_EXECUTION_BRANCH)' != ''">$(BUDDY_EXECUTION_BRANCH)</RepositoryBranch>
102107
</PropertyGroup>
103108

104-
<PropertyGroup Condition="'$(EnableRexCodeGenerator)' == 'true'">
105-
<!-- VSCode/Razor compatibility -->
106-
<CoreCompileDependsOn>PrepareResources;$(CoreCompileDependsOn)</CoreCompileDependsOn>
109+
<PropertyGroup>
110+
<!-- Default to Just Works resources generation. See https://www.cazzulino.com/resources.html -->
111+
<CoreCompileDependsOn>CoreResGen;$(CoreCompileDependsOn)</CoreCompileDependsOn>
107112
</PropertyGroup>
108-
113+
109114
<ItemGroup>
110115
<!-- Consider the project out of date if any of these files changes -->
111116
<UpToDateCheck Include="@(None);@(Content);@(EmbeddedResource)" />
112-
<!-- We'll typically use ThisAssembly.Strings instead of the built-in resource manager codegen -->
113-
<EmbeddedResource Update="@(EmbeddedResource)" Generator="" Condition="'$(EnableRexCodeGenerator)' != 'true'" />
114-
<EmbeddedResource Update="@(EmbeddedResource)" Condition="'$(EnableRexCodeGenerator)' == 'true'">
117+
<!-- Opt-in to typed resource generation by setting custom tool to MSBuild:Compile -->
118+
<EmbeddedResource Update="@(EmbeddedResource -> WithMetadataValue('Generator', 'MSBuild:Compile'))" Type="Resx">
115119
<!-- Default to Just Works resources generation. See https://www.cazzulino.com/resources.html -->
116-
<Generator>MSBuild:Compile</Generator>
117120
<StronglyTypedFileName>$(IntermediateOutputPath)\$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.'))%(Filename).g$(DefaultLanguageSourceExtension)</StronglyTypedFileName>
118121
<StronglyTypedLanguage>$(Language)</StronglyTypedLanguage>
119122
<StronglyTypedNamespace Condition="'%(RelativeDir)' == ''">$(RootNamespace)</StronglyTypedNamespace>

src/nuget.config

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<config>
4+
<add key="signatureValidationMode" value="accept" />
5+
</config>
6+
<trustedSigners>
7+
<author name="Microsoft">
8+
<certificate fingerprint="3F9001EA83C560D712C24CF213C3D312CB3BFF51EE89435D3430BD06B5D0EECE" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
9+
<certificate fingerprint="AA12DA22A49BCE7D5C1AE64CC1F3D892F150DA76140F210ABD2CBFFCA2C18A27" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
10+
<certificate fingerprint="566A31882BE208BE4422F7CFD66ED09F5D4524A5994F50CCC8B05EC0528C1353" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
11+
<certificate fingerprint="1F4B311D9ACC115C8DC8018B5A49E00FCE6DA8E2855F9F014CA6F34570BC482D" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
12+
</author>
13+
<repository name="nuget.org" serviceIndex="https://api.nuget.org/v3/index.json">
14+
<certificate fingerprint="0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
15+
<certificate fingerprint="5A2901D6ADA3D18260B9C6DFE2133C95D74B9EEF6AE0E5DC334C8454D1477DF4" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
16+
<certificate fingerprint="CF7AC17AD047ECD5FDC36822031B12D4EF078B6F2B4C5E6BA41F8FF2CF4BAD67" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
17+
<certificate fingerprint="C474CE76007D02394E0DA5E4DE7C14C680F9E282013CFEF653EF5DB71FDF61F8" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
18+
<certificate fingerprint="1F4B311D9ACC115C8DC8018B5A49E00FCE6DA8E2855F9F014CA6F34570BC482D" hashAlgorithm="SHA256" allowUntrustedRoot="true" />
19+
</repository>
20+
</trustedSigners>
21+
</configuration>

0 commit comments

Comments
 (0)