Skip to content

Commit 5a6cd94

Browse files
committed
Add CI artifacts
1 parent 7cc9f87 commit 5a6cd94

File tree

7 files changed

+354
-0
lines changed

7 files changed

+354
-0
lines changed

.github/dependabot.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: nuget
7+
directory: /
8+
schedule:
9+
interval: daily
10+
groups:
11+
Azure:
12+
patterns:
13+
- "Azure*"
14+
- "Microsoft.Azure*"
15+
Identity:
16+
patterns:
17+
- "System.IdentityModel*"
18+
- "Microsoft.IdentityModel*"
19+
System:
20+
patterns:
21+
- "System*"
22+
exclude-patterns:
23+
- "System.IdentityModel*"
24+
Extensions:
25+
patterns:
26+
- "Microsoft.Extensions*"
27+
exclude-patterns:
28+
- "Microsoft.Extensions.AI*"
29+
ExtensionsAI:
30+
patterns:
31+
- "Microsoft.Extensions.AI*"
32+
Web:
33+
patterns:
34+
- "Microsoft.AspNetCore*"
35+
Tests:
36+
patterns:
37+
- "Microsoft.NET.Test*"
38+
- "xunit*"
39+
- "coverlet*"
40+
ThisAssembly:
41+
patterns:
42+
- "ThisAssembly*"
43+
ProtoBuf:
44+
patterns:
45+
- "protobuf-*"
46+
Spectre:
47+
patterns:
48+
- "Spectre.Console*"

.github/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- bydesign
5+
- dependencies
6+
- duplicate
7+
- question
8+
- invalid
9+
- wontfix
10+
- need info
11+
- techdebt
12+
authors:
13+
- devlooped-bot
14+
- dependabot
15+
- github-actions
16+
categories:
17+
- title: ✨ Implemented enhancements
18+
labels:
19+
- enhancement
20+
- title: 🐛 Fixed bugs
21+
labels:
22+
- bug
23+
- title: 📝 Documentation updates
24+
labels:
25+
- docs
26+
- documentation
27+
- title: 🔨 Other
28+
labels:
29+
- '*'
30+
exclude:
31+
labels:
32+
- dependencies

.github/workflows/build.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Builds and runs tests in all three supported OSes
2+
# Pushes CI feed if secrets.SLEET_CONNECTION is provided
3+
4+
name: build
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
configuration:
9+
type: choice
10+
description: Configuration
11+
options:
12+
- Release
13+
- Debug
14+
push:
15+
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
16+
paths-ignore:
17+
- changelog.md
18+
- readme.md
19+
pull_request:
20+
types: [opened, synchronize, reopened]
21+
22+
env:
23+
DOTNET_NOLOGO: true
24+
PackOnBuild: true
25+
GeneratePackageOnBuild: true
26+
VersionPrefix: 42.42.${{ github.run_number }}
27+
VersionLabel: ${{ github.ref }}
28+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
29+
MSBUILDTERMINALLOGGER: auto
30+
Configuration: ${{ github.event.inputs.configuration || 'Release' }}
31+
SLEET_FEED_URL: ${{ vars.SLEET_FEED_URL }}
32+
33+
defaults:
34+
run:
35+
shell: bash
36+
37+
jobs:
38+
os-matrix:
39+
runs-on: ubuntu-latest
40+
outputs:
41+
matrix: ${{ steps.lookup.outputs.matrix }}
42+
steps:
43+
- name: 🤘 checkout
44+
uses: actions/checkout@v4
45+
46+
- name: 🔎 lookup
47+
id: lookup
48+
shell: pwsh
49+
run: |
50+
$path = './.github/workflows/os-matrix.json'
51+
$os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' }
52+
echo "matrix=$os" >> $env:GITHUB_OUTPUT
53+
54+
build:
55+
needs: os-matrix
56+
name: build-${{ matrix.os }}
57+
runs-on: ${{ matrix.os }}
58+
strategy:
59+
matrix:
60+
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
61+
steps:
62+
- name: 🤘 checkout
63+
uses: actions/checkout@v4
64+
with:
65+
submodules: recursive
66+
fetch-depth: 0
67+
68+
- name: ⚙ dotnet
69+
uses: devlooped/actions-dotnet-env@v1
70+
71+
- name: 🙏 build
72+
run: dotnet build -m:1 -bl:build.binlog
73+
74+
- name: 🧪 test
75+
run: |
76+
dotnet tool update -g dotnet-retest
77+
dotnet retest -- --no-build
78+
79+
- name: 🐛 logs
80+
uses: actions/upload-artifact@v4
81+
if: runner.debug && always()
82+
with:
83+
name: logs
84+
path: '*.binlog'
85+
86+
- name: 🚀 sleet
87+
env:
88+
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
89+
if: env.SLEET_CONNECTION != ''
90+
run: |
91+
dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r)
92+
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"
93+
94+
dotnet-format:
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: 🤘 checkout
98+
uses: actions/checkout@v4
99+
with:
100+
submodules: recursive
101+
fetch-depth: 0
102+
103+
- name: ⚙ dotnet
104+
uses: devlooped/actions-dotnet-env@v1
105+
106+
- name: ✓ ensure format
107+
run: |
108+
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
109+
dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget

.github/workflows/dotnet-file.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Synchronizes .netconfig-configured files with dotnet-file
2+
name: dotnet-file
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
push:
8+
branches: [ 'dotnet-file' ]
9+
10+
env:
11+
DOTNET_NOLOGO: true
12+
13+
jobs:
14+
run:
15+
permissions:
16+
contents: write
17+
uses: devlooped/oss/.github/workflows/dotnet-file-core.yml@main
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: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
permissions:
15+
contents: write
16+
pull-requests: write
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+
token: ${{ env.GH_TOKEN }}
30+
31+
- name: +Mᐁ includes
32+
uses: devlooped/actions-includes@v1
33+
34+
- name: ✍ pull request
35+
uses: peter-evans/create-pull-request@v6
36+
with:
37+
add-paths: '**.md'
38+
base: main
39+
branch: markdown-includes
40+
delete-branch: true
41+
labels: docs
42+
author: ${{ env.BOT_AUTHOR }}
43+
committer: ${{ env.BOT_AUTHOR }}
44+
commit-message: +Mᐁ includes
45+
title: +Mᐁ includes
46+
body: +Mᐁ includes
47+
token: ${{ env.GH_TOKEN }}

.github/workflows/publish.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Builds a final release version and pushes to nuget.org
2+
# whenever a release is published.
3+
# Requires: secrets.NUGET_API_KEY
4+
5+
name: publish
6+
on:
7+
release:
8+
types: [prereleased, released]
9+
10+
env:
11+
DOTNET_NOLOGO: true
12+
Configuration: Release
13+
PackOnBuild: true
14+
GeneratePackageOnBuild: true
15+
VersionLabel: ${{ github.ref }}
16+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
17+
MSBUILDTERMINALLOGGER: auto
18+
SLEET_FEED_URL: https://api.nuget.org/v3/index.json
19+
20+
jobs:
21+
publish:
22+
runs-on: ${{ vars.PUBLISH_AGENT || 'ubuntu-latest' }}
23+
steps:
24+
- name: 🤘 checkout
25+
uses: actions/checkout@v4
26+
with:
27+
submodules: recursive
28+
fetch-depth: 0
29+
30+
- name: ⚙ dotnet
31+
uses: devlooped/actions-dotnet-env@v1
32+
33+
- name: 🙏 build
34+
run: dotnet build -m:1 -bl:build.binlog
35+
36+
- name: 🧪 test
37+
run: |
38+
dotnet tool update -g dotnet-retest
39+
dotnet retest -- --no-build
40+
41+
- name: 🐛 logs
42+
uses: actions/upload-artifact@v4
43+
if: runner.debug && always()
44+
with:
45+
name: logs
46+
path: '*.binlog'
47+
48+
- name: 🚀 nuget
49+
env:
50+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
51+
if: ${{ env.NUGET_API_KEY != '' && github.event.action != 'prereleased' }}
52+
working-directory: bin
53+
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
54+
55+
- name: 🚀 sleet
56+
env:
57+
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
58+
if: env.SLEET_CONNECTION != ''
59+
run: |
60+
dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r)
61+
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"

.netconfig

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,39 @@
2222

2323
etag = 19087699f05396205e6b050d999a43b175bd242f6e8fac86f6df936310178b03
2424
weak
25+
[file ".github/dependabot.yml"]
26+
url = https://github.com/devlooped/oss/tree/main/.github/dependabot.yml
27+
sha = e733294084fb3e75d517a2e961e87df8faae7dc6
28+
29+
etag = 3bf8d9214a15c049ca5cfe80d212a8cbe4753b8a638a9804ef73d34c7def9618
30+
weak
31+
[file ".github/release.yml"]
32+
url = https://github.com/devlooped/oss/tree/main/.github/release.yml
33+
sha = 0c23e24704625cf75b2cb1fdc566cef7e20af313
34+
35+
etag = 310df162242c95ed19ed12e3c96a65f77e558b46dced676ad5255eb12caafe75
36+
weak
37+
[file ".github/workflows/dotnet-file.yml"]
38+
url = https://github.com/devlooped/oss/tree/main/.github/workflows/dotnet-file.yml
39+
sha = 8fa147d4799d73819040736c399d0b1db2c2d86c
40+
41+
etag = 1ca805a23656e99c03f9d478dba8ccef6e571f5de2ac0e9bb7e3c5216c99a694
42+
weak
43+
[file ".github/workflows/includes.yml"]
44+
url = https://github.com/devlooped/oss/tree/main/.github/workflows/includes.yml
45+
sha = 85829f2510f335f4a411867f3dbaaa116c3ab3de
46+
47+
etag = 086f6b6316cc6ea7089c0dcc6980be519e6ed6e6201e65042ef41b82634ec0ee
48+
weak
49+
[file ".github/workflows/build.yml"]
50+
url = https://github.com/devlooped/oss/tree/main/.github/workflows/build.yml
51+
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
52+
53+
etag = bf99c19427f4372ecfe38ec56aa8c411058684fb717da5661f17ac00388b3602
54+
weak
55+
[file ".github/workflows/publish.yml"]
56+
url = https://github.com/devlooped/oss/tree/main/.github/workflows/publish.yml
57+
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
58+
59+
etag = 2ef43521627aa3a91dd55bdc2856ec0c6a93b42485d4fe9d6b181f9ee42c8e18
60+
weak

0 commit comments

Comments
 (0)