Skip to content

Commit b1dfaae

Browse files
committed
feat: Initial commit.
1 parent 5cbbe8c commit b1dfaae

File tree

51 files changed

+2769
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2769
-1
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "nuget" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
groups:
13+
all:
14+
patterns:
15+
- "*"
16+
ignore:
17+
- dependency-name: Microsoft.CodeAnalysis.CSharp

.github/workflows/auto-merge.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Auto-approve and auto-merge bot pull requests
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
auto-merge:
13+
runs-on: ubuntu-latest
14+
if: ${{ (github.actor == 'dependabot[bot]' || github.actor == 'HavenDV') && github.repository_owner == 'tryAGI' }}
15+
steps:
16+
- name: Dependabot metadata
17+
if: ${{ github.actor == 'dependabot[bot]' }}
18+
id: metadata
19+
uses: dependabot/fetch-metadata@0fb21704c18a42ce5aa8d720ea4b912f5e6babef
20+
with:
21+
github-token: "${{ secrets.GITHUB_TOKEN }}"
22+
23+
- name: Show sender
24+
run: echo ${{ github.event.pull_request.sender }}
25+
26+
- name: Show triggering_actor
27+
run: echo ${{ github.triggering_actor }}
28+
29+
- name: Approve a PR
30+
run: gh pr review --approve "$PR_URL"
31+
env:
32+
PR_URL: ${{ github.event.pull_request.html_url }}
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Enable auto-merge
36+
run: gh pr merge --auto --merge "$PR_URL"
37+
env:
38+
PR_URL: ${{ github.event.pull_request.html_url }}
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/dotnet.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Publish
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- v**
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
publish:
14+
name: Publish
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: 8.0.x
26+
27+
- name: Restore
28+
run: dotnet restore
29+
30+
- name: Build
31+
run: dotnet build
32+
--configuration Release
33+
--no-restore
34+
35+
- name: Test
36+
run: dotnet test
37+
--configuration Release
38+
--logger GitHubActions
39+
--no-build
40+
41+
- name: Publish to NuGet
42+
run: dotnet nuget push
43+
**.nupkg
44+
--skip-duplicate
45+
--source https://api.nuget.org/v3/index.json
46+
--api-key ${{ secrets.NUGET_KEY }}
47+
48+
release:
49+
name: Release
50+
runs-on: ubuntu-latest
51+
needs: [publish]
52+
if: startsWith(github.ref, 'refs/tags/v')
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Create release
58+
run: gh release create ${{ github.ref_name }}
59+
--title "${{ github.ref_name }}"
60+
--generate-notes
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pull-request.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
jobs:
8+
test:
9+
name: Test
10+
uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main
11+
with:
12+
generate-build-number: false
13+
conventional-commits-publish-conditions: false
14+
enable-caching: false
15+
additional-test-arguments: '--logger GitHubActions'

0 commit comments

Comments
 (0)