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

Commit 09273ce

Browse files
authored
Bump files with dotnet-file sync
# devlooped/oss - Move changelog config to .github, switch to gem devlooped/oss@b7ce2be - Don't collect logs anymore devlooped/oss@6bd81a3 - Don't run build when changing docs devlooped/oss@db76fb9 - 🔨 Populate RepositoryBranch in CI w/MSBuild devlooped/oss@55c0b32 - Don't fail the build if sleet finds no packages to push devlooped/oss@6928fc7 - Allow manually running builds devlooped/oss@fc5889d - Automatically retry failed tests up to 5 times devlooped/oss@8bc16a7 - Ensure GNU grep is used on macOS devlooped/oss@964caa3 - Scale sponsors logo to 36px, which makes it more suitable for readmes devlooped/oss@f566e8a - Remove unnecessary viewbox in logo devlooped/oss@491c6ee - Allow manually running changelog and dotnet-file workflows devlooped/oss@084aa7c - Ignore TestResults folders devlooped/oss@a9f9d3f - 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 - Automatically set/include icon.png and readme.md devlooped/oss@e260665 - If PackAsTool=true, default IsPackable=true, for obvious reasons devlooped/oss@fde1f6f - If PackFolder is specified, assume IsPackable=true devlooped/oss@b0249cf - Make src-level readme visible for easier editing devlooped/oss@bfe0f2a - Improve default rendering of header icon devlooped/oss@9db26e2 - Escape double quotes from changelog devlooped/oss@2b73cb3 - Replace double quotes with single quotes devlooped/oss@0cbe576 - Replace 'undefined' JSON keyword devlooped/oss@b07aaab - Automatically label dotnet-file bump and auto-delete branch devlooped/oss@eeaeb55 # devlooped/.github - 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 09273ce

14 files changed

+231
-169
lines changed
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: 41 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ 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
914
pull_request:
1015
types: [opened, synchronize, reopened]
1116

@@ -47,20 +52,47 @@ jobs:
4752
fetch-depth: 0
4853

4954
- name: 🙏 build
50-
run: dotnet build -m:1 -bl:build.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}
55+
run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
56+
57+
- name: ⚙ GNU grep
58+
if: matrix.os == 'macOS-latest'
59+
run: |
60+
brew install grep
61+
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
5162
5263
- 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
64+
shell: bash --noprofile --norc {0}
65+
env:
66+
LC_ALL: en_US.utf8
67+
run: |
68+
[ -f .bash_profile ] && source .bash_profile
69+
counter=0
70+
exitcode=0
71+
reset="\e[0m"
72+
warn="\e[0;33m"
73+
while [ $counter -lt 6 ]
74+
do
75+
if [ $filter ]
76+
then
77+
echo -e "${warn}Retry $counter for $filter ${reset}"
78+
fi
79+
# run test and forward output also to a file in addition to stdout (tee command)
80+
dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m --filter=$filter | tee ./output.log
81+
# capture dotnet test exit status, different from tee
82+
exitcode=${PIPESTATUS[0]}
83+
if [ $exitcode == 0 ]
84+
then
85+
exit 0
86+
fi
87+
# cat output, get failed test names, join as DisplayName=TEST with |, remove trailing |.
88+
filter=$(cat ./output.log | grep -o -P '(?<=\sFailed\s)\w*' | awk 'BEGIN { ORS="|" } { print("DisplayName=" $0) }' | grep -o -P '.*(?=\|$)')
89+
((counter++))
90+
done
91+
exit $exitcode
5492
5593
- name: 📦 pack
56-
run: dotnet pack -m:1 -bl:pack.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}
94+
run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
5795

58-
- name: 🔼 packages
59-
uses: actions/upload-artifact@v2
60-
with:
61-
name: bin
62-
path: bin/*.nupkg
63-
6496
# Only push CI package to sleet feed if building on ubuntu (fastest)
6597
- name: 🚀 sleet
6698
env:
@@ -69,80 +101,3 @@ jobs:
69101
run: |
70102
dotnet tool install -g --version 4.0.18 sleet
71103
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"
72-
73-
acceptance:
74-
name: acceptance-${{ matrix.os }}
75-
runs-on: ${{ matrix.os }}
76-
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-
101-
steps:
102-
- name: 🤘 checkout
103-
uses: actions/checkout@v2
104-
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
142-
with:
143-
name: bin
144-
path: bin
145-
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

.github/workflows/changelog.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
on:
33
release:
44
types: [released]
5+
workflow_dispatch:
56

67
env:
78
GH_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -24,9 +25,9 @@ jobs:
2425
token: ${{ env.GH_TOKEN }}
2526

2627
- name: ⚙ changelog
27-
uses: faberNovel/github-changelog-generator-action@master
28-
with:
29-
options: --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md
28+
run: |
29+
sudo gem install github_changelog_generator
30+
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
3031
3132
- name: 🚀 changelog
3233
run: |

.github/workflows/dotnet-file.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Synchronizes .netconfig-configured files with dotnet-file
22
name: dotnet-file
33
on:
4+
workflow_dispatch:
45
schedule:
56
- cron: "0 0 * * *"
67
push:
@@ -50,6 +51,8 @@ jobs:
5051
with:
5152
base: main
5253
branch: dotnet-file-sync
54+
delete-branch: true
55+
labels: dependencies
5356
commit-message: Bump files with dotnet-file sync
5457

5558
${{ env.CHANGES }}

.github/workflows/pages.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
name: pages
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
56
- main
67
- pages
78

9+
env:
10+
PAGES_ORGANIZATION: ${{ secrets.PAGES_ORGANIZATION }}
11+
PAGES_REPOSITORY: ${{ secrets.PAGES_REPOSITORY }}
12+
813
jobs:
914
gh-pages:
1015
runs-on: ubuntu-latest
@@ -17,11 +22,20 @@ jobs:
1722
sudo gem install bundler
1823
bundle install
1924
20-
- name: 🖉 repo
21-
run: echo "REPOSITORY=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
25+
- name: 🖉 default env
26+
env:
27+
PAGES_ORGANIZATION: ${{ secrets.PAGES_ORGANIZATION }}
28+
PAGES_REPOSITORY: ${{ secrets.PAGES_REPOSITORY }}
29+
run: |
30+
echo "PAGES_ORGANIZATION=${PAGES_ORGANIZATION}" >> $GITHUB_ENV
31+
echo "PAGES_REPOSITORY=${PAGES_REPOSITORY}" >> $GITHUB_ENV
32+
33+
- name: 🖉 default repo
34+
if: env.PAGES_REPOSITORY == ''
35+
run: echo "PAGES_REPOSITORY=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
2236

2337
- name: 🙏 build
24-
run: bundle exec jekyll build -b ${{ env.REPOSITORY }}
38+
run: bundle exec jekyll build -b ${{ env.PAGES_REPOSITORY }}
2539
env:
2640
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2741

@@ -30,15 +44,15 @@ jobs:
3044
cd _site
3145
git init
3246
git add -A
33-
git config --local user.email "hello@clarius.org"
34-
git config --local user.name "GitHub Action"
47+
git config --local user.email "bot@devlooped.com"
48+
git config --local user.name "bot@devlooped.com"
3549
git commit -m "Publish pages from ${GITHUB_REPOSITORY}@${GITHUB_SHA:0:9}"
3650
3751
- name: 🚀 push
3852
uses: ad-m/github-push-action@v0.6.0
3953
with:
40-
github_token: ${{ secrets.CLARIUS_ACCESS_TOKEN }}
41-
repository: clarius/${{ env.REPOSITORY }}
54+
github_token: ${{ secrets.PAGES_ACCESS_TOKEN }}
55+
repository: ${{ env.PAGES_ORGANIZATION }}/${{ env.PAGES_REPOSITORY }}
4256
branch: gh-pages
4357
force: true
4458
directory: ./_site

.github/workflows/publish.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,46 @@ jobs:
2222
fetch-depth: 0
2323

2424
- name: 🙏 build
25-
run: dotnet build -m:1 -bl:build.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/}
25+
run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v}
26+
27+
- name: ⚙ GNU grep
28+
if: matrix.os == 'macOS-latest'
29+
run: |
30+
brew install grep
31+
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
2632
2733
- name: 🧪 test
28-
run: dotnet test --no-build -m:1
34+
shell: bash --noprofile --norc {0}
35+
env:
36+
LC_ALL: en_US.utf8
37+
run: |
38+
[ -f .bash_profile ] && source .bash_profile
39+
counter=0
40+
exitcode=0
41+
reset="\e[0m"
42+
warn="\e[0;33m"
43+
while [ $counter -lt 6 ]
44+
do
45+
if [ $filter ]
46+
then
47+
echo -e "${warn}Retry $counter for $filter ${reset}"
48+
fi
49+
# run test and forward output also to a file in addition to stdout (tee command)
50+
dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m --filter=$filter | tee ./output.log
51+
# capture dotnet test exit status, different from tee
52+
exitcode=${PIPESTATUS[0]}
53+
if [ $exitcode == 0 ]
54+
then
55+
exit 0
56+
fi
57+
# cat output, get failed test names, join as DisplayName=TEST with |, remove trailing |.
58+
filter=$(cat ./output.log | grep -o -P '(?<=\sFailed\s)\w*' | awk 'BEGIN { ORS="|" } { print("DisplayName=" $0) }' | grep -o -P '.*(?=\|$)')
59+
((counter++))
60+
done
61+
exit $exitcode
2962
3063
- name: 📦 pack
31-
run: dotnet pack -m:1 -bl:pack.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/}
32-
33-
- name: 🔼 logs
34-
if: ${{ always() }}
35-
uses: actions/upload-artifact@v2
36-
with:
37-
path: '**/*.binlog'
64+
run: dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v}
3865

3966
- name: 🚀 nuget
4067
run: dotnet nuget push ./bin/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate

.github/workflows/release-artifacts.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,13 @@ jobs:
2020
run: echo "CURRENT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2121

2222
- name: 🙏 build
23-
run: dotnet build -m:1 -bl:build.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/}
23+
run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v}
2424

2525
- name: 🧪 test
2626
run: dotnet test --no-build -m:1
2727

2828
- name: 📦 pack
29-
run: dotnet pack -m:1 -bl:pack.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/}
30-
31-
- name: 🔼 logs
32-
if: ${{ always() }}
33-
uses: actions/upload-artifact@v2
34-
with:
35-
path: '**/*.binlog'
29+
run: dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v}
3630

3731
- name: 🔽 gh
3832
run: |

.github/workflows/release-notes.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ jobs:
2121
run: echo "SINCE_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" >> $GITHUB_ENV
2222

2323
- name: ⚙ changelog
24-
uses: faberNovel/github-changelog-generator-action@master
2524
if: env.SINCE_TAG != ''
26-
with:
27-
options: --token ${{ secrets.GITHUB_TOKEN }} --since-tag ${{ env.SINCE_TAG }} --o changelog.md
25+
run: |
26+
sudo gem install github_changelog_generator
27+
github_changelog_generator --since-tag ${{ env.SINCE_TAG }} --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
2828
2929
- name: ⚙ changelog
30-
uses: faberNovel/github-changelog-generator-action@master
3130
if: env.SINCE_TAG == ''
32-
with:
33-
options: --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md
31+
run: |
32+
sudo gem install github_changelog_generator
33+
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
3434
3535
- name: 🖉 release
3636
shell: pwsh
@@ -42,7 +42,7 @@ jobs:
4242
ConvertFrom-Json |
4343
select -ExpandProperty id
4444
45-
$notes = (Get-Content .\changelog.md | where { !($_ -like '\*') } | %{ $_.replace('\', '\\') }) -join '\n'
45+
$notes = (Get-Content .\changelog.md | where { !($_ -like '\*') } | %{ $_.replace('\', '\\').replace('"', "'").replace('undefined', 'un-defined') }) -join '\n'
4646
$headers = @{ 'Accept'='application/vnd.github.v3+json;charset=utf-8'; 'Authorization' = "bearer $env:GITHUB_TOKEN" }
4747
$body = '{ "body":"' + $notes + '" }'
4848
@@ -53,4 +53,4 @@ jobs:
5353
iwr -Body $body "$env:GITHUB_API_URL/repos/$env:GITHUB_REPOSITORY/releases/$id" -Method PATCH -Headers $headers |
5454
select -ExpandProperty Content |
5555
ConvertFrom-Json |
56-
ConvertTo-Json
56+
ConvertTo-Json

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ bin
22
obj
33
artifacts
44
pack
5+
TestResults
56
.vs
67
.vscode
78

@@ -26,4 +27,4 @@ _site
2627
.jekyll-metadata
2728
.jekyll-cache
2829
Gemfile.lock
29-
package-lock.json
30+
package-lock.json

0 commit comments

Comments
 (0)