Skip to content

Commit e824d58

Browse files
authored
chore: add AsyncGenerator workflow (#37)
1 parent f8d5d07 commit e824d58

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Generate Async code
2+
3+
on:
4+
pull_request_target:
5+
paths:
6+
- '**.cs'
7+
8+
permissions: {}
9+
10+
jobs:
11+
generate-async:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
ref: ${{ github.event.pull_request.head.ref }}
18+
repository: ${{ github.event.pull_request.head.repo.full_name }}
19+
token: ${{ secrets.NHIBERNATE_BOT_TOKEN }}
20+
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@v2
23+
with:
24+
dotnet-version: 6.0.x
25+
26+
- name: Generate Async code
27+
run: |
28+
dotnet tool restore
29+
dotnet restore src
30+
dotnet async-generator
31+
32+
- name: Push changes
33+
run: |
34+
git config user.name github-actions[bot]
35+
git config user.email github-actions[bot]@users.noreply.github.com
36+
if [[ -z "$(git status --porcelain)" ]]; then
37+
echo "No changes to commit"
38+
exit 0
39+
fi
40+
git add -A
41+
git commit -am "Generate async files"
42+
git push

0 commit comments

Comments
 (0)