-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: CI
permissions:
contents: write
pull-requests: write
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Commit updated files
run: |
git config core.filemode false
dotnet run --project ./src/ShukujitsuSharp.Generator
if ! git diff --exit-code --quiet
then
git add -A
git config user.name github-actions
git config user.email action@github.com
git commit -m "Update ShukujitsuData.cs"
git push
fi