1+ ---
12name : ci
23
34env :
67on :
78 push :
89 paths-ignore :
9- - ' doc/**'
10- - ' img/**'
11- - ' changelog.md'
12- - ' readme.md'
10+ - doc/**
11+ - img/**
12+ - changelog.md
13+ - readme.md
1314 pull_request :
15+ paths-ignore :
16+ - doc/**
17+ - img/**
18+ - changelog.md
19+ - readme.md
1420
1521jobs :
1622 build :
1723 runs-on : windows-latest
1824
1925 steps :
20- - name : Checkout
21- uses : actions/checkout@v4
22-
23- - name : Install .NET Core
24- uses : actions/setup-dotnet@v3
25- with :
26- dotnet-version : ' 7.0.x'
27-
28- - name : Build & test (Release)
29- run : dotnet test src -c Release
30-
31- - name : Should Deploy?
32- if : github.event_name == 'push'
33- run : |
34- if ( "${{github.ref}}" -match "^refs/tags/[0-9]+\.[0-9]+\.[0-9]+" ) {
35- echo "UNITYNUGET_DEPLOY=1" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
36- }
37-
38- - name : Publish (Release)
39- if : env.UNITYNUGET_DEPLOY == 1
40- run : dotnet publish src/UnityNuGet.Server/UnityNuGet.Server.csproj -c Release -o build/${{env.PROJECT_NAME}}
41-
42- - name : Azure Deploy
43- if : env.UNITYNUGET_DEPLOY == 1
44- uses : azure/webapps-deploy@v2
45- with :
46- app-name : unitynuget-registry
47- publish-profile : ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
48- package : build/${{env.PROJECT_NAME}}
26+ - name : Checkout
27+ uses : actions/checkout@v4
28+
29+ - name : Install .NET Core
30+ uses : actions/setup-dotnet@v3
31+ with :
32+ dotnet-version : ' 7.0.x'
33+
34+ - name : Build & test (Release)
35+ run : dotnet test src -c Release
36+
37+ - name : Should Deploy?
38+ if : github.event_name == 'push'
39+ run : |
40+ if ( "${{github.ref}}" -match "^refs/tags/[0-9]+\.[0-9]+\.[0-9]+" ) {
41+ echo "UNITYNUGET_DEPLOY=1" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
42+ }
43+
44+ - name : Publish (Release)
45+ if : env.UNITYNUGET_DEPLOY == 1
46+ run : dotnet publish src/UnityNuGet.Server/UnityNuGet.Server.csproj -c Release -o build/${{env.PROJECT_NAME}}
47+
48+ - name : Azure Deploy
49+ if : env.UNITYNUGET_DEPLOY == 1
50+ uses : azure/webapps-deploy@v2
51+ with :
52+ app-name : unitynuget-registry
53+ publish-profile : ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
54+ package : build/${{env.PROJECT_NAME}}
0 commit comments