|
5 | 5 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true |
6 | 6 | DOTNET_ENVIRONMENT: github |
7 | 7 | ASPNETCORE_ENVIRONMENT: github |
8 | | - BUILD_PATH: '${{github.workspace}}/artifacts' |
| 8 | + BUILD_PATH: "${{github.workspace}}/artifacts" |
9 | 9 | COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |
10 | 10 |
|
11 | 11 | on: |
|
14 | 14 | - master |
15 | 15 | - develop |
16 | 16 | tags: |
17 | | - - 'v*' |
| 17 | + - "v*" |
18 | 18 | paths-ignore: |
19 | | - - 'docs/**' |
20 | | - - 'mkdocs.yml' |
| 19 | + - "docs/**" |
| 20 | + - "mkdocs.yml" |
21 | 21 | pull_request: |
22 | 22 | branches: |
23 | 23 | - master |
24 | 24 | - develop |
25 | 25 |
|
26 | 26 | jobs: |
27 | | - |
28 | 27 | build: |
29 | 28 | runs-on: ubuntu-latest |
30 | 29 |
|
31 | 30 | services: |
32 | 31 | mssql: |
33 | 32 | image: mcr.microsoft.com/mssql/server:2019-latest |
34 | 33 | env: |
35 | | - MSSQL_SA_PASSWORD: '!P@ssw0rd' |
36 | | - ACCEPT_EULA: 'Y' |
| 34 | + MSSQL_SA_PASSWORD: "!P@ssw0rd" |
| 35 | + ACCEPT_EULA: "Y" |
37 | 36 | ports: |
38 | 37 | - 1433:1433 |
39 | 38 | volumes: |
40 | 39 | - mssql_data:/var/opt/mssql |
41 | 40 |
|
42 | 41 | steps: |
43 | | - - name: Checkout |
44 | | - uses: actions/checkout@v4 |
45 | | - with: |
46 | | - fetch-depth: 0 |
47 | | - |
48 | | - - name: Install .NET |
49 | | - uses: actions/setup-dotnet@v4 |
50 | | - with: |
| 42 | + - name: Checkout |
| 43 | + uses: actions/checkout@v4 |
| 44 | + with: |
| 45 | + fetch-depth: 0 |
| 46 | + |
| 47 | + - name: Install .NET |
| 48 | + uses: actions/setup-dotnet@v4 |
| 49 | + with: |
51 | 50 | dotnet-version: | |
52 | | - 6.0.x |
53 | | - 8.0.x |
| 51 | + 6.0.x |
| 52 | + 8.0.x |
54 | 53 |
|
55 | | - - name: Restore Dependencies |
56 | | - run: dotnet restore |
| 54 | + - name: Restore Dependencies |
| 55 | + run: dotnet restore |
57 | 56 |
|
58 | | - - name: Build Solution |
59 | | - run: dotnet build --no-restore --configuration Release |
| 57 | + - name: Build Solution |
| 58 | + run: dotnet build --no-restore --configuration Release |
60 | 59 |
|
61 | | - - name: Run Test |
62 | | - run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings |
| 60 | + - name: Run Test |
| 61 | + run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings |
63 | 62 |
|
64 | | - - name: Report Coverage |
65 | | - if: success() |
66 | | - uses: coverallsapp/github-action@v2 |
67 | | - with: |
68 | | - file: "${{github.workspace}}/test/*/TestResults/*/coverage.info" |
69 | | - format: lcov |
| 63 | + - name: Report Coverage |
| 64 | + if: success() |
| 65 | + uses: coverallsapp/github-action@v2 |
| 66 | + with: |
| 67 | + file: "${{github.workspace}}/test/*/TestResults/*/coverage.info" |
| 68 | + format: lcov |
70 | 69 |
|
71 | | - - name: Create Packages |
72 | | - if: success() && github.event_name != 'pull_request' |
73 | | - run: dotnet pack --configuration Release --include-symbols --include-source --no-build --no-restore --output "${{env.BUILD_PATH}}" |
| 70 | + - name: Create Packages |
| 71 | + if: success() && github.event_name != 'pull_request' |
| 72 | + run: dotnet pack --configuration Release --no-build --output "${{env.BUILD_PATH}}" |
74 | 73 |
|
75 | | - - name: Upload Packages |
76 | | - if: success() && github.event_name != 'pull_request' |
77 | | - uses: actions/upload-artifact@v4 |
78 | | - with: |
79 | | - name: packages |
80 | | - path: '${{env.BUILD_PATH}}' |
| 74 | + - name: Upload Packages |
| 75 | + if: success() && github.event_name != 'pull_request' |
| 76 | + uses: actions/upload-artifact@v4 |
| 77 | + with: |
| 78 | + name: packages |
| 79 | + path: "${{env.BUILD_PATH}}" |
81 | 80 |
|
82 | 81 | deploy: |
83 | 82 | runs-on: ubuntu-latest |
84 | 83 | needs: build |
85 | 84 | if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) |
86 | 85 |
|
87 | 86 | steps: |
88 | | - - name: Download Artifact |
89 | | - uses: actions/download-artifact@v4 |
90 | | - with: |
91 | | - name: packages |
92 | | - |
93 | | - - name: Publish Packages GitHub |
94 | | - run: | |
95 | | - for package in $(find -name "*.nupkg"); do |
96 | | - echo "${0##*/}": Pushing $package... |
97 | | - dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate |
98 | | - done |
99 | | -
|
100 | | - - name: Publish Packages feedz |
101 | | - run: | |
102 | | - for package in $(find -name "*.nupkg"); do |
103 | | - echo "${0##*/}": Pushing $package... |
104 | | - dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate |
105 | | - done |
106 | | -
|
107 | | - - name: Publish Packages Nuget |
108 | | - if: startsWith(github.ref, 'refs/tags/v') |
109 | | - run: | |
110 | | - for package in $(find -name "*.nupkg"); do |
111 | | - echo "${0##*/}": Pushing $package... |
112 | | - dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate |
113 | | - done |
114 | | -
|
| 87 | + - name: Download Artifact |
| 88 | + uses: actions/download-artifact@v4 |
| 89 | + with: |
| 90 | + name: packages |
| 91 | + |
| 92 | + - name: Publish Packages GitHub |
| 93 | + run: | |
| 94 | + for package in $(find -name "*.nupkg"); do |
| 95 | + echo "${0##*/}": Pushing $package... |
| 96 | + dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate |
| 97 | + done |
| 98 | +
|
| 99 | + - name: Publish Packages feedz |
| 100 | + run: | |
| 101 | + for package in $(find -name "*.nupkg"); do |
| 102 | + echo "${0##*/}": Pushing $package... |
| 103 | + dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate |
| 104 | + done |
| 105 | +
|
| 106 | + - name: Publish Packages Nuget |
| 107 | + if: startsWith(github.ref, 'refs/tags/v') |
| 108 | + run: | |
| 109 | + for package in $(find -name "*.nupkg"); do |
| 110 | + echo "${0##*/}": Pushing $package... |
| 111 | + dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate |
| 112 | + done |
0 commit comments