File tree 1 file changed +29
-2
lines changed 1 file changed +29
-2
lines changed Original file line number Diff line number Diff line change 6
6
paths-ignore :
7
7
- " **.md"
8
8
- " LICENSE"
9
+ issue_comment :
10
+ types : [created]
9
11
10
12
jobs :
13
+ isCodeOwner :
14
+ if : github.event.issue.pull_request && contains(github.event.comment.body, '/test-pack')
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v4
19
+ - name : Check if comment author is a code owner
20
+ id : check
21
+ run : |
22
+ CODEOWNERS=$(cat .github/CODEOWNERS)
23
+ COMMENT_AUTHOR=${{ github.event.comment.user.login }}
24
+ if echo "$CODEOWNERS" | grep -q "$COMMENT_AUTHOR"; then
25
+ echo "::set-output name=isCodeOwner::true"
26
+ else
27
+ echo "::set-output name=isCodeOwner::false"
28
+ fi
11
29
build-release :
12
30
runs-on : windows-latest
13
- needs : []
14
31
steps :
15
32
- uses : actions/checkout@v4
16
33
21
38
22
39
- name : dotnet build
23
40
run : dotnet build -c release
41
+
42
+ - name : dotnet publish
43
+ if : steps.isCodeOwner.outputs.isCodeOwner == 'true'
44
+ run : dotnet publish -o pub -c release -p:PublishSingleFile=true -p:Version=${{ env.APP_VERSION }}
45
+
46
+ - name : Upload binaries
47
+ if : steps.isCodeOwner.outputs.isCodeOwner == 'true'
48
+ uses : actions/upload-artifact@v4
49
+ with :
50
+ name : binaries
51
+ path : pub/FileSorter.*
24
52
build-debug :
25
53
runs-on : windows-latest
26
- needs : []
27
54
steps :
28
55
- uses : actions/checkout@v4
29
56
You can’t perform that action at this time.
0 commit comments