File tree Expand file tree Collapse file tree 3 files changed +60
-45
lines changed Expand file tree Collapse file tree 3 files changed +60
-45
lines changed Original file line number Diff line number Diff line change 1
1
name : Build and test
2
2
on :
3
- push :
4
- branches :
5
- - ' *'
6
- pull_request :
7
- branches :
8
- - ' *'
3
+ push :
4
+ branches :
5
+ - ' *'
6
+ pull_request :
7
+ branches :
8
+ - ' *'
9
9
jobs :
10
- build :
11
- runs-on : ubuntu-latest
12
- timeout-minutes : 3
13
- steps :
14
- - name : Checkout
15
- uses : actions/checkout@v4
16
- - name : Build
17
- run : dotnet build --configuration Release
18
- - name : Test
19
- run : dotnet test --configuration Release --no-build
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ timeout-minutes : 3
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+ - name : Build
17
+ run : dotnet build --configuration Release --output /var/build
18
+ - name : Upload build result
19
+ uses : actions/upload-artifact@v4
20
+ with :
21
+ name : build
22
+ path : /var/build
23
+ test :
24
+ runs-on : ubuntu-latest
25
+ needs : build
26
+ timeout-minutes : 3
27
+ steps :
28
+ - name : Download build result
29
+ uses : actions/download-artifact@v4
30
+ with :
31
+ name : build
32
+ - name : Test
33
+ run : dotnet test --configuration Release --no-build /var/build
Original file line number Diff line number Diff line change 1
1
name : Publish to nuget.org
2
2
on :
3
- push :
4
- tags :
5
- - " v[0-9]+.[0-9]+.[0-9]+"
3
+ workflow_run :
4
+ workflows : ["Check code quality"]
5
+ types :
6
+ - completed
7
+ push :
8
+ tags :
9
+ - " v[0-9]+.[0-9]+.[0-9]+"
6
10
jobs :
7
- build :
8
- runs-on : ubuntu-latest
9
- timeout-minutes : 3
10
- steps :
11
- - name : Checkout
12
- uses : actions/checkout@v4
13
- with :
14
- fetch-depth : 0
15
- - name : Verify commit exists in origin/master
16
- run : git branch --remote --contains | grep origin/master
17
- - name : Extract release notes
18
- run : |
19
- git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES
20
- - name : Set VERSION variable from tag
21
- run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
22
- - name : Build
23
- run : dotnet build /warnaserror --configuration Release /p:Version=${VERSION}
24
- - name : Test
25
- run : dotnet test --configuration Release /p:Version=${VERSION} --no-build
26
- - name : Pack
27
- run : dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
28
- - name : Push nuget to nuget.org
29
- run : dotnet nuget push RxTelegram.Bot.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
11
+ publish :
12
+ runs-on : ubuntu-latest
13
+ timeout-minutes : 3
14
+ steps :
15
+ - name : Download build result
16
+ uses : actions/download-artifact@v4
17
+ with :
18
+ name : build
19
+ - name : Set VERSION variable from tag
20
+ run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
21
+ - name : Pack
22
+ run : dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
23
+ - name : Push nuget to nuget.org
24
+ run : dotnet nuget push RxTelegram.Bot.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change 1
1
name : Check code quality
2
- on : [ push, pull_request ]
2
+ on :
3
+ push :
4
+ pull_request :
5
+ workflow_run :
6
+ workflows : ["Build and test"]
7
+ types :
8
+ - completed
3
9
jobs :
4
- build :
5
- name : Build
10
+ sonarqube :
11
+ name : sonarqube
6
12
runs-on : windows-latest
7
13
steps :
8
14
- name : Set up JDK 17
You can’t perform that action at this time.
0 commit comments