Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit 6816626

Browse files
authored
Bump files with dotnet-file sync
# devlooped/oss - Move changelog config to .github, switch to gem devlooped/oss@b7ce2be - Fix syntax for excluding one file devlooped/oss@5d05e54 - Fix initial test run without filter devlooped/oss@9a1b075 - Revert "Add default package source mapping for central package versions" devlooped/oss@1537aa9 - 🔨 Populate RepositoryBranch in CI w/MSBuild devlooped/oss@55c0b32 - If PackAsTool=true, default IsPackable=true, for obvious reasons devlooped/oss@fde1f6f - If PackFolder is specified, assume IsPackable=true devlooped/oss@b0249cf - Automatically set/include icon.png and readme.md devlooped/oss@e260665 - Make src-level readme visible for easier editing devlooped/oss@bfe0f2a - Add RepositoryBranch as a ThisAssembly.Project property devlooped/oss@83d7378 - Add RepositoryRoot property from source control information devlooped/oss@f9763d3 - Add RepositoryUrl as project property, if available devlooped/oss@4f57ffe - Remove DumpItems task. Easily replaceable with MSBuild.DumpItems devlooped/oss@024f733 - Remove the source link in the package description devlooped/oss@b9fb0a7 - Improve default rendering of header icon devlooped/oss@9db26e2 - Ignore xUnit1013 so records can be used as test classes devlooped/oss@369cd2b - Don't collect logs anymore devlooped/oss@6bd81a3 - Don't run build when changing docs devlooped/oss@db76fb9 - Don't fail the build if sleet finds no packages to push devlooped/oss@6928fc7 - Allow manually running builds devlooped/oss@fc5889d - Scale sponsors logo to 36px, which makes it more suitable for readmes devlooped/oss@f566e8a - Remove unnecessary viewbox in logo devlooped/oss@491c6ee - Automatically retry failed tests up to 5 times devlooped/oss@8bc16a7 - Ensure GNU grep is used on macOS devlooped/oss@964caa3 - Reuse test with retries definition by using a composite action devlooped/oss@3b9f317 - Allow manually running changelog and dotnet-file workflows devlooped/oss@084aa7c - Now that .NET6 is LTS, ensure it's installed devlooped/oss@7ebebbd - Switch to windows-latest agent which is now .NET6 devlooped/oss@445239b - Ignore nuget-provided files for formatting devlooped/oss@bbf637b - Ignore changes to readme.md as build trigger devlooped/oss@e19ed32 - Ensure ruby v3 is installed for changelog generation devlooped/oss@be8f625 - Use BOT_ defaults consistently devlooped/oss@98919f7 - Use simple bash variable expansion devlooped/oss@acedd1d - Ensure checkout before defaults devlooped/oss@721ee85 - Move format check for last devlooped/oss@7db501b - Rework to pass secrets explicitly devlooped/oss@15e9486 - Make build matrix configurable per-repo devlooped/oss@391da5e - Rename matrix lookup job and steps devlooped/oss@cf8e339 - Update to public bot defaults action devlooped/oss@b9671b9 - Add fallback GITHUB_TOKEN to bot defaults devlooped/oss@5406d90 - Ignore TestResults folders devlooped/oss@a9f9d3f - Remove GNU grep step from publish since it runs ubuntu devlooped/oss@0e5a33c - Ignore azurite files devlooped/oss@829faad - Add azurite hidden folders too devlooped/oss@978c71c - Ignore *.log files devlooped/oss@c78868e - Use full name as Author, since Owner is already kzu devlooped/oss@0fc6e0e - Only include/pack icon.png if it exists in the default location devlooped/oss@ae442c0 - Preserve transitively copied content in VS devlooped/oss@52d6c40 - Generate API documentation for non-tests projects by default devlooped/oss@32213f2 - Add nuget.org as first restore source, for convenience devlooped/oss@3f294a1 - Global tools should run on whatever latest runtime is installed. devlooped/oss@b65c8f1 - Ensure MSBuild tooling can access package artifacts always via PKG_[PackageId] devlooped/oss@cc6922f - Add CI as a project property devlooped/oss@2fea462 - GH CLI is installed by default nowadays devlooped/oss@a7ee681 - Escape double quotes from changelog devlooped/oss@2b73cb3 - Replace double quotes with single quotes devlooped/oss@0cbe576 - Replace 'undefined' JSON keyword devlooped/oss@b07aaab - Always pass in auth headers to GH API devlooped/oss@a922d03 - Automatically label dotnet-file bump and auto-delete branch devlooped/oss@eeaeb55 - Add icon prefix to match dependabot devlooped/oss@2a39a42 - Add rate limiting fix devlooped/oss@ef47d78 - Use bot account for sync commit author devlooped/oss@1d3a2f4 - Ensure both author and committer match devlooped/oss@d94ddb1 - Resolve includes after file sync devlooped/oss@8f45cf2 - By default don't validate includes devlooped/oss@aed791a - Ignore errors creating the PR devlooped/oss@b97b8f1 # devlooped/.github - Simplify workflow, skip for bot accounts devlooped/.github@e347e5c - Allow overriding target pages org devlooped/.github@8f41377 - Improve overriding and defaulting for token too devlooped/.github@245ad41 - Allow running pages workflow manually devlooped/.github@4234724 - Pages access token should always come from secrets devlooped/.github@e8f3774
1 parent d3a00b2 commit 6816626

21 files changed

+433
-357
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,6 @@ csharp_new_line_before_catch = true
8787
csharp_new_line_before_finally = true
8888
csharp_new_line_before_members_in_object_initializers = true
8989
csharp_new_line_before_members_in_anonymous_types = true
90+
91+
# xUnit1013: Public method should be marked as test. Allows using records as test classes
92+
dotnet_diagnostic.xUnit1013.severity = none
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
usernames-as-github-logins=true
2-
header-label=
32
issues_wo_labels=true
43
pr_wo_labels=true
5-
exclude-labels=dependencies,duplicate,question,invalid,wontfix
4+
exclude-labels=bydesign,dependencies,duplicate,question,invalid,wontfix,need info
65
enhancement-label=:sparkles: Implemented enhancements:
76
bugs-label=:bug: Fixed bugs:
87
issues-label=:hammer: Other:
98
pr-label=:twisted_rightwards_arrows: Merged:
9+
unreleased=false

.github/workflows/build.yml

Lines changed: 43 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
workflow_dispatch:
77
push:
88
branches: [ main, dev, 'feature/*', 'rel/*' ]
9+
paths-ignore:
10+
- changelog.md
11+
- code-of-conduct.md
12+
- security.md
13+
- support.md
14+
- readme.md
915
pull_request:
1016
types: [opened, synchronize, reopened]
1117

@@ -17,50 +23,57 @@ defaults:
1723
shell: bash
1824

1925
jobs:
20-
dotnet-format:
26+
os-matrix:
2127
runs-on: ubuntu-latest
28+
outputs:
29+
matrix: ${{ steps.lookup.outputs.matrix }}
2230
steps:
2331
- name: 🤘 checkout
2432
uses: actions/checkout@v2
25-
with:
26-
submodules: recursive
27-
fetch-depth: 0
28-
29-
- name: ✓ ensure format
33+
34+
- name: 🔎 lookup
35+
id: lookup
36+
shell: pwsh
3037
run: |
31-
dotnet tool update -g dotnet-format --version 5.0.*
32-
dotnet restore
33-
dotnet format --check -v:diag
38+
$path = './.github/workflows/os-matrix.json'
39+
$os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' }
40+
echo "::set-output name=matrix::$os"
3441
3542
build:
43+
needs: os-matrix
3644
name: build-${{ matrix.os }}
37-
needs: dotnet-format
3845
runs-on: ${{ matrix.os }}
3946
strategy:
4047
matrix:
41-
os: [ubuntu-latest, windows-latest, macOS-latest]
48+
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
4249
steps:
4350
- name: 🤘 checkout
4451
uses: actions/checkout@v2
4552
with:
4653
submodules: recursive
4754
fetch-depth: 0
4855

56+
- name: ⚙ dotnet
57+
uses: actions/setup-dotnet@v1
58+
if: matrix.os != 'windows-latest'
59+
with:
60+
dotnet-version: '6.0.x'
61+
4962
- name: 🙏 build
50-
run: dotnet build -m:1 -bl:build.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}
63+
run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
64+
65+
- name: ⚙ GNU grep
66+
if: matrix.os == 'macOS-latest'
67+
run: |
68+
brew install grep
69+
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
5170
5271
- name: 🧪 test
53-
run: dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m -d $GITHUB_WORKSPACE/logs/${{ matrix.os }}.txt -r $GITHUB_WORKSPACE/logs
72+
uses: ./.github/workflows/test
5473

5574
- name: 📦 pack
56-
run: dotnet pack -m:1 -bl:pack.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}
75+
run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
5776

58-
- name: 🔼 packages
59-
uses: actions/upload-artifact@v2
60-
with:
61-
name: bin
62-
path: bin/*.nupkg
63-
6477
# Only push CI package to sleet feed if building on ubuntu (fastest)
6578
- name: 🚀 sleet
6679
env:
@@ -70,79 +83,20 @@ jobs:
7083
dotnet tool install -g --version 4.0.18 sleet
7184
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"
7285
73-
acceptance:
74-
name: acceptance-${{ matrix.os }}
75-
runs-on: ${{ matrix.os }}
86+
dotnet-format:
87+
runs-on: ubuntu-latest
7688
needs: build
77-
strategy:
78-
matrix:
79-
os: [ubuntu-latest, windows-latest, macOS-latest]
80-
steps:
81-
- name: 🤘 checkout
82-
uses: actions/checkout@v2
83-
84-
- name: 🔽 packages
85-
uses: actions/download-artifact@v2
86-
with:
87-
name: bin
88-
path: bin
89-
90-
- name: 🧪 test
91-
run: dotnet test -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
92-
working-directory: src/Acceptance
93-
94-
preview:
95-
defaults:
96-
run:
97-
shell: pwsh
98-
needs: dotnet-format
99-
runs-on: windows-latest
100-
10189
steps:
10290
- name: 🤘 checkout
10391
uses: actions/checkout@v2
92+
with:
93+
submodules: recursive
94+
fetch-depth: 0
10495

105-
# > VS Preview
106-
- name: 🔽 dotnet-vs
107-
run: dotnet tool update -g dotnet-vs
108-
- name: 🔽 vs preview
109-
run: vs install preview --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools
110-
- name: ≥ msbuild
111-
run: echo "$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" >> $env:GITHUB_PATH
112-
# < VS Preview
113-
114-
- name: ⚙ curl
115-
run: |
116-
iwr -useb get.scoop.sh | iex
117-
scoop install curl
118-
- name: 🔍 status for PR
119-
if: ${{ github.event.pull_request.head.sha }}
120-
run: echo "STATUS_SHA=${{ github.event.pull_request.head.sha }}" >> $env:GITHUB_ENV
121-
122-
- name: 🔍 status for branch
123-
if: ${{ !github.event.pull_request.head.sha }}
124-
run: echo "STATUS_SHA=$($env:GITHUB_SHA)" >> $env:GITHUB_ENV
125-
126-
- name: ⌛ wait on build
127-
env:
128-
CHECK: build-windows-latest
129-
SHA: ${{ env.STATUS_SHA }}
130-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
131-
run: ./.github/workflows/wait-status.ps1
132-
133-
- name: ⌛ wait on acceptance
134-
env:
135-
CHECK: acceptance-windows-latest
136-
SHA: ${{ env.STATUS_SHA }}
137-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
138-
run: ./.github/workflows/wait-status.ps1
139-
140-
- name: 🔽 packages
141-
uses: actions/download-artifact@v2
96+
- name: ⚙ dotnet
97+
uses: actions/setup-dotnet@v1
14298
with:
143-
name: bin
144-
path: bin
99+
dotnet-version: '6.0.x'
145100

146-
- name: 🧪 test
147-
run: msbuild -r -t:build,test -p:TargetFramework=net472 -p:VersionLabel="$($env:GITHUB_REF).$($env:GITHUB_RUN_NUMBER)"
148-
working-directory: src/Acceptance
101+
- name: ✓ ensure format
102+
run: dotnet format --verify-no-changes -v:diag --exclude ~/.nuget

.github/workflows/changelog.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
11
name: changelog
22
on:
3+
workflow_dispatch:
34
release:
45
types: [released]
56

6-
env:
7-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
8-
97
jobs:
108
changelog:
119
runs-on: ubuntu-latest
1210
steps:
13-
- name: 🔍 GH_TOKEN
14-
if: env.GH_TOKEN == ''
15-
env:
16-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17-
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
18-
11+
- name: 🤖 defaults
12+
uses: devlooped/actions-bot@v1
13+
with:
14+
name: ${{ secrets.BOT_NAME }}
15+
email: ${{ secrets.BOT_EMAIL }}
16+
gh_token: ${{ secrets.GH_TOKEN }}
17+
github_token: ${{ secrets.GITHUB_TOKEN }}
18+
1919
- name: 🤘 checkout
2020
uses: actions/checkout@v2
2121
with:
2222
fetch-depth: 0
2323
ref: main
2424
token: ${{ env.GH_TOKEN }}
25+
26+
- name: ⚙ ruby
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: 3.0.3
2530

2631
- name: ⚙ changelog
27-
uses: faberNovel/github-changelog-generator-action@master
28-
with:
29-
options: --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md
32+
run: |
33+
gem install github_changelog_generator
34+
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token $GH_TOKEN --o changelog.md --config-file .github/.github_changelog_generator
3035
3136
- name: 🚀 changelog
3237
run: |
33-
git config --local user.name github-actions
34-
git config --local user.email github-actions@github.com
3538
git add changelog.md
36-
(git commit -m "🖉 Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"
39+
(git commit -m "🖉 Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"

.github/workflows/dotnet-file.yml

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
# Synchronizes .netconfig-configured files with dotnet-file
1+
# Synchronizes .netconfig-configured files with dotnet-file
22
name: dotnet-file
33
on:
4+
workflow_dispatch:
45
schedule:
56
- cron: "0 0 * * *"
67
push:
78
branches: [ 'dotnet-file' ]
89

910
env:
1011
DOTNET_NOLOGO: true
11-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1212

1313
jobs:
1414
sync:
1515
runs-on: windows-latest
1616
steps:
17-
- name: 🔍 GH_TOKEN
18-
if: env.GH_TOKEN == ''
19-
shell: bash
20-
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22-
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
17+
- name: 🤖 defaults
18+
uses: devlooped/actions-bot@v1
19+
with:
20+
name: ${{ secrets.BOT_NAME }}
21+
email: ${{ secrets.BOT_EMAIL }}
22+
gh_token: ${{ secrets.GH_TOKEN }}
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
2324

2425
- name: 🤘 checkout
2526
uses: actions/checkout@v2
@@ -28,7 +29,24 @@ jobs:
2829
ref: main
2930
token: ${{ env.GH_TOKEN }}
3031

32+
- name: ⌛ rate
33+
shell: pwsh
34+
run: |
35+
# add random sleep since we run on fixed schedule
36+
sleep (get-random -max 60)
37+
# get currently authenticated user rate limit info
38+
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
39+
# if we don't have at least 100 requests left, wait until reset
40+
if ($rate.remaining -lt 10) {
41+
$wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
42+
echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
43+
sleep $wait
44+
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
45+
echo "Rate limit has reset to $($rate.remaining) requests"
46+
}
47+
3148
- name: 🔄 sync
49+
shell: pwsh
3250
run: |
3351
dotnet tool update -g dotnet-gcm
3452
dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN
@@ -45,14 +63,24 @@ jobs:
4563
echo 'No changelog was generated'
4664
}
4765
66+
- name: +Mᐁ includes
67+
uses: devlooped/actions-include@v1
68+
with:
69+
validate: false
70+
4871
- name: ✍ pull request
4972
uses: peter-evans/create-pull-request@v3
73+
continue-on-error: true
5074
with:
5175
base: main
5276
branch: dotnet-file-sync
53-
commit-message: Bump files with dotnet-file sync
77+
delete-branch: true
78+
labels: dependencies
79+
author: ${{ env.BOT_AUTHOR }}
80+
committer: ${{ env.BOT_AUTHOR }}
81+
commit-message: ⬆️ Bump files with dotnet-file sync
5482

5583
${{ env.CHANGES }}
56-
title: "Bump files with dotnet-file sync"
84+
title: "⬆️ Bump files with dotnet-file sync"
5785
body: ${{ env.CHANGES }}
5886
token: ${{ env.GH_TOKEN }}

.github/workflows/includes.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: +Mᐁ includes
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'main'
7+
paths:
8+
- '**.md'
9+
- '!changelog.md'
10+
11+
jobs:
12+
includes:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: 🤖 defaults
16+
uses: devlooped/actions-bot@v1
17+
with:
18+
name: ${{ secrets.BOT_NAME }}
19+
email: ${{ secrets.BOT_EMAIL }}
20+
gh_token: ${{ secrets.GH_TOKEN }}
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: 🤘 checkout
24+
uses: actions/checkout@v2
25+
with:
26+
token: ${{ env.GH_TOKEN }}
27+
28+
- name: +Mᐁ includes
29+
uses: devlooped/actions-include@v1
30+
31+
- name: ✍ pull request
32+
uses: peter-evans/create-pull-request@v3
33+
with:
34+
base: main
35+
branch: markdown-includes
36+
delete-branch: true
37+
labels: docs
38+
author: ${{ env.BOT_AUTHOR }}
39+
committer: ${{ env.BOT_AUTHOR }}
40+
commit-message: +Mᐁ includes
41+
title: +Mᐁ includes
42+
body: +Mᐁ includes
43+
token: ${{ env.GH_TOKEN }}

0 commit comments

Comments
 (0)