Skip to content

Commit 02a93f8

Browse files
committed
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Group Spectre.Console updates devlooped/oss@917ff54 - Move dotnet setup to composite action devlooped/oss@08c7077 - Add explicit write permissions from caller workflow devlooped/oss@8fa147d - Attempt to get necessary permissions for default token devlooped/oss@85829f2 - Support using current Version from CVM devlooped/oss@2fff747 - Allow workflow to work cross-org devlooped/oss@af171b7 - Update nuget.config with new(ish?) MS certs devlooped/oss@032439d
1 parent d780d62 commit 02a93f8

File tree

11 files changed

+204
-20
lines changed

11 files changed

+204
-20
lines changed

.github/actions/dotnet/action.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: ⚙ dotnet
2+
description: Configures dotnet if the repo/org defines the DOTNET custom property
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: 🔎 dotnet
8+
id: dotnet
9+
shell: bash
10+
run: |
11+
VERSIONS=$(gh api /repos/${{ github.repository }}/properties/values | jq -r '.[] | select(.property_name == "DOTNET") | .value')
12+
echo "versions=$VERSIONS" >> $GITHUB_OUTPUT
13+
14+
- name: ⚙ dotnet
15+
if: steps.dotnet.outputs.versions != ''
16+
uses: actions/setup-dotnet@v4
17+
with:
18+
dotnet-version: ${{ steps.dotnet.outputs.versions }}

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ updates:
3838
ProtoBuf:
3939
patterns:
4040
- "protobuf-*"
41+
Spectre:
42+
patterns:
43+
- "Spectre.Console*"

.github/workflows/build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ env:
2828
GH_TOKEN: ${{ secrets.GH_TOKEN }}
2929
MSBUILDTERMINALLOGGER: auto
3030
Configuration: ${{ github.event.inputs.configuration || 'Release' }}
31+
SLEET_FEED_URL: ${{ vars.SLEET_FEED_URL }}
3132

3233
defaults:
3334
run:
@@ -64,6 +65,9 @@ jobs:
6465
submodules: recursive
6566
fetch-depth: 0
6667

68+
- name: ⚙ dotnet
69+
uses: ./.github/actions/dotnet
70+
6771
- name: 🙏 build
6872
run: dotnet build -m:1 -bl:build.binlog
6973

@@ -73,7 +77,7 @@ jobs:
7377
dotnet retest -- --no-build
7478
7579
- name: 🐛 logs
76-
uses: actions/upload-artifact@v3
80+
uses: actions/upload-artifact@v4
7781
if: runner.debug && always()
7882
with:
7983
name: logs
@@ -96,6 +100,14 @@ jobs:
96100
submodules: recursive
97101
fetch-depth: 0
98102

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

.github/workflows/dotnet-file.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@ env:
1212

1313
jobs:
1414
run:
15+
permissions:
16+
contents: write
1517
uses: devlooped/oss/.github/workflows/dotnet-file-core.yml@main
16-
secrets: inherit
18+
secrets:
19+
BOT_NAME: ${{ secrets.BOT_NAME }}
20+
BOT_EMAIL: ${{ secrets.BOT_EMAIL }}
21+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.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

.github/workflows/publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ env:
1515
VersionLabel: ${{ github.ref }}
1616
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1717
MSBUILDTERMINALLOGGER: auto
18-
18+
SLEET_FEED_URL: https://api.nuget.org/v3/index.json
19+
1920
jobs:
2021
publish:
2122
runs-on: ${{ vars.PUBLISH_AGENT || 'ubuntu-latest' }}
@@ -26,6 +27,9 @@ jobs:
2627
submodules: recursive
2728
fetch-depth: 0
2829

30+
- name: ⚙ dotnet
31+
uses: ./.github/actions/dotnet
32+
2933
- name: 🙏 build
3034
run: dotnet build -m:1 -bl:build.binlog
3135

@@ -35,7 +39,7 @@ jobs:
3539
dotnet retest -- --no-build
3640
3741
- name: 🐛 logs
38-
uses: actions/upload-artifact@v3
42+
uses: actions/upload-artifact@v4
3943
if: runner.debug && always()
4044
with:
4145
name: logs

.netconfig

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
weak
2727
[file ".github/dependabot.yml"]
2828
url = https://github.com/devlooped/oss/blob/main/.github/dependabot.yml
29-
sha = 49661dbf0720cde93eb5569be7523b5912351560
29+
sha = 917ff5486e25bec90038e7ab6d146fd82c61f846
3030

31-
etag = c147ea2f3431ca0338c315c4a45b56ee233c4d30f8d6ab698d0e1980a257fd6a
31+
etag = 50bf50df5a6eeb1705baea50f4c6e06d167a89cb5a590887ff939bd4120bd442
3232
weak
3333
[file ".github/release.yml"]
3434
url = https://github.com/devlooped/oss/blob/main/.github/release.yml
@@ -38,9 +38,9 @@
3838
weak
3939
[file ".github/workflows/build.yml"]
4040
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
41-
sha = 5e17ad62ebb5241555a7a4d29e3ab15e5ba120d2
41+
sha = 08c70776943839f73dbea2e65355108747468508
4242

43-
etag = f358acb1e45596bf0aad49996017da44939de30b805289c4ad205a7ccb6f99cb
43+
etag = fb2e91cdc9fb7a4d3e8f698e525816c5d8febb35b005c278eecca8056e78f809
4444
weak
4545
[file ".github/workflows/changelog.config"]
4646
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.config
@@ -56,21 +56,21 @@
5656
weak
5757
[file ".github/workflows/dotnet-file.yml"]
5858
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file.yml
59-
sha = 7afe350f7e80a230e922db026d4e1198ba15cae1
59+
sha = 8fa147d4799d73819040736c399d0b1db2c2d86c
6060

61-
etag = 65e9794df6caff779eb989c8f71ddf4d4109b24a75af79e4f8d0fe6ba7bd9702
61+
etag = 1ca805a23656e99c03f9d478dba8ccef6e571f5de2ac0e9bb7e3c5216c99a694
6262
weak
6363
[file ".github/workflows/includes.yml"]
6464
url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml
65-
sha = d152e7437fd0d6f6d9363d23cb3b78c07335ea49
65+
sha = 85829f2510f335f4a411867f3dbaaa116c3ab3de
6666

67-
etag = ec40db34f379d0c6d83b2ec15624f330318a172cc4f85b5417c63e86eaf601df
67+
etag = 086f6b6316cc6ea7089c0dcc6980be519e6ed6e6201e65042ef41b82634ec0ee
6868
weak
6969
[file ".github/workflows/publish.yml"]
7070
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
71-
sha = 5e17ad62ebb5241555a7a4d29e3ab15e5ba120d2
71+
sha = 08c70776943839f73dbea2e65355108747468508
7272

73-
etag = 2cc96046d8f28e7cbcde89ed56d3d89e1a70fb0de7846ee1827bee66b7dfbcf1
73+
etag = 722a2c7cb3a42bc24ca7fb48d2e9a336641ed0599418239e24efbafccf64bd50
7474
weak
7575
[file ".github/workflows/triage.yml"]
7676
url = https://github.com/devlooped/oss/blob/main/.github/workflows/triage.yml
@@ -107,9 +107,9 @@
107107
weak
108108
[file "src/Directory.Build.props"]
109109
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
110-
sha = b76de49afb376aa48eb172963ed70663b59b31d3
110+
sha = 2fff747a9673b499c99f2da183cdd5263fdc9333
111111

112-
etag = c8b56f3860cc7ccb8773b7bd6189f5c7a6e3a2c27e9104c1ee201fbdc5af9873
112+
etag = 0fccddf04f282fe98122ab2610dc2972c205a521254559bf013655c6271b0017
113113
weak
114114
[file "src/Directory.Build.targets"]
115115
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
@@ -129,3 +129,18 @@
129129

130130
etag = 7a210949b41605c0bdaf13fb1d47339a274b8b941c27321950a32d7d4c63a049
131131
weak
132+
[file ".github/actions/dotnet/action.yml"]
133+
url = https://github.com/devlooped/oss/blob/main/.github/actions/dotnet/action.yml
134+
sha = 08c70776943839f73dbea2e65355108747468508
135+
etag = a5f1fa7f652cc2c2e13b7c236e5f8403aea26667d6a040c84ef976af267af6ab
136+
weak
137+
[file ".github/workflows/dotnet-file-core.yml"]
138+
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file-core.yml
139+
sha = af171b7a87382ee665ba6fbaeb5f38a3551e1c23
140+
etag = 5ce370f52933ab2a4cd50f2b410e842fc5eab23088db2bf98b6c4d4ccdc9022b
141+
weak
142+
[file "src/nuget.config"]
143+
url = https://github.com/devlooped/oss/blob/main/src/nuget.config
144+
sha = 032439dbf180fca0539a5bd3a019f18ab3484b76
145+
etag = da7c0104131bd474b52fc9bc9f9bda6470e24ae38d4fb9f5c4f719bc01370ab5
146+
weak

readme.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ The versioning scheme for packages is:
369369

370370
<!-- sponsors.md -->
371371
[![Clarius Org](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png "Clarius Org")](https://github.com/clarius)
372-
[![Kirill Osenkov](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KirillOsenkov.png "Kirill Osenkov")](https://github.com/KirillOsenkov)
373372
[![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)
374373
[![Torutek](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek-gh.png "Torutek")](https://github.com/torutek-gh)
375374
[![DRIVE.NET, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/drivenet.png "DRIVE.NET, Inc.")](https://github.com/drivenet)
@@ -387,9 +386,6 @@ The versioning scheme for packages is:
387386
[![David JENNI](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/davidjenni.png "David JENNI")](https://github.com/davidjenni)
388387
[![Jonathan ](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Jonathan-Hickey.png "Jonathan ")](https://github.com/Jonathan-Hickey)
389388
[![Charley Wu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/akunzai.png "Charley Wu")](https://github.com/akunzai)
390-
[![Jakob Tikjøb Andersen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jakobt.png "Jakob Tikjøb Andersen")](https://github.com/jakobt)
391-
[![Tino Hager](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tinohager.png "Tino Hager")](https://github.com/tinohager)
392-
[![Mark Seemann](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ploeh.png "Mark Seemann")](https://github.com/ploeh)
393389
[![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png "Ken Bonny")](https://github.com/KenBonny)
394390
[![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png "Simon Cropp")](https://github.com/SimonCropp)
395391
[![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png "agileworks-eu")](https://github.com/agileworks-eu)

src/Directory.Build.props

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,18 @@
153153
<Import Project="Directory.props" Condition="Exists('Directory.props')"/>
154154
<Import Project="Directory.props.user" Condition="Exists('Directory.props.user')" />
155155

156+
<!-- If the imported props changed ManagePackageVersionsCentrally, we need to replicate
157+
the Version defaults from Microsoft.NET.DefaultAssemblyInfo.targets since it's too
158+
early here and Directory.Packages.props will be imported right after this time,
159+
meaning dependencies that expect to use the currently building Version would not
160+
get the expected value.
161+
-->
162+
<PropertyGroup Condition="'$(ManagePackageVersionsCentrally)' == 'true' and '$(Version)' == ''">
163+
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">1.0.0</VersionPrefix>
164+
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
165+
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
166+
</PropertyGroup>
167+
156168
<!-- Implemented by SDK in .targets, guaranteeing it's overwritten. Added here since we add a DependsOnTargets to it.
157169
Covers backwards compatiblity with non-SDK projects. -->
158170
<Target Name="InitializeSourceControlInformation" />

0 commit comments

Comments
 (0)