1111 DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
1212 DOTNET_CLI_TELEMETRY_OPTOUT : true
1313 PROJECT_NAME : SessionStorage
14- GITHUB_FEED : https://nuget.pkg.github.com/Blazored/
15- GITHUB_USER : chrissainty
1614 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1715 NUGET_FEED : https://api.nuget.org/v3/index.json
1816 NUGET_KEY : ${{ secrets.NUGET_KEY }}
@@ -38,60 +36,24 @@ jobs:
3836 - name : Build
3937 run : dotnet build -c Release --no-restore src/Blazored.$PROJECT_NAME/Blazored.$PROJECT_NAME.csproj
4038
41- - name : Test
42- run : dotnet test -c Release
39+ - name : Build Test Extensions
40+ run : dotnet build -c Release --no-restore src/Blazored.$PROJECT_NAME.TestExtensions/Blazored.$PROJECT_NAME.TestExtensions.csproj
4341
44- - name : Pack
45- run : dotnet pack -v normal - c Release --no-restore --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID src /Blazored.$PROJECT_NAME/Blazored.$PROJECT_NAME.*proj
42+ - name : Test Local Storage
43+ run : dotnet test - c Release --no-restore --verbosity normal tests /Blazored.$PROJECT_NAME.Tests
4644
47- - name : Publish Sample Site
48- run : dotnet publish -c Release samples/BlazorWebAssembly/BlazorWebAssembly.csproj
49-
50- - name : Rewrite base href
51- uses : SteveSandersonMS/ghaction-rewrite-base-href@v1
52- with :
53- html_path : samples/BlazorWebAssembly/bin/Release/net5.0/publish/wwwroot/index.html
54- base_href : /${{ env.PROJECT_NAME }}/
55-
56- - name : Deploy to Github Pages
57- uses : JamesIves/github-pages-deploy-action@releases/v3
58- with :
59- ACCESS_TOKEN : $GITHUB_TOKEN
60- BASE_BRANCH : main # The branch the action should deploy from.
61- BRANCH : gh-pages # The branch the action should deploy to.
62- FOLDER : samples/BlazorWebAssembly/bin/Release/net5.0/publish/wwwroot # The folder the action should deploy.
63- SINGLE_COMMIT : true
64-
65- - name : Upload Artifact
66- uses : actions/upload-artifact@v2
67- with :
68- name : nupkg
69- path : ./src/Blazored.${{ env.PROJECT_NAME }}/bin/Release/*.nupkg
70- prerelease :
71- needs : build
72- if : github.event_name != 'release'
73- runs-on : ubuntu-latest
74- steps :
75- - name : Download Artifact
76- uses : actions/download-artifact@v1
77- with :
78- name : nupkg
79- - name : Push to GitHub Feed
80- run : |
81- for f in ./nupkg/*.nupkg
82- do
83- curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
84- done
8545 deploy :
8646 needs : build
8747 if : github.event_name == 'release'
8848 runs-on : ubuntu-latest
8949 steps :
9050 - uses : actions/checkout@v2
51+
9152 - name : Setup .NET Core
9253 uses : actions/setup-dotnet@v1
9354 with :
9455 dotnet-version : ${{ env.NETCORE_VERSION }}
56+
9557 - name : Create Release NuGet package
9658 run : |
9759 arrTag=(${GITHUB_REF//\// })
@@ -100,11 +62,25 @@ jobs:
10062 VERSION="${VERSION//v}"
10163 echo Clean Version: $VERSION
10264 dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/Blazored.$PROJECT_NAME/Blazored.$PROJECT_NAME.*proj
103- - name : Push to GitHub Feed
104- run : |
105- for f in ./nupkg/*.nupkg
106- do
107- curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
108- done
65+ dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/Blazored.$PROJECT_NAME.TestExtensions/Blazored.$PROJECT_NAME.TestExtensions.csproj
66+
10967 - name : Push to NuGet Feed
110- run : dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY
68+ run : dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --api-key $NUGET_KEY --skip-duplicate
69+
70+ - name : Publish Sample Site
71+ run : dotnet publish -c Release samples/BlazorWebAssembly/BlazorWebAssembly.csproj
72+
73+ - name : Rewrite base href
74+ uses : SteveSandersonMS/ghaction-rewrite-base-href@v1
75+ with :
76+ html_path : samples/BlazorWebAssembly/bin/Release/net5.0/publish/wwwroot/index.html
77+ base_href : /${{ env.PROJECT_NAME }}/
78+
79+ - name : Deploy to Github Pages
80+ uses : JamesIves/github-pages-deploy-action@releases/v3
81+ with :
82+ ACCESS_TOKEN : $GITHUB_TOKEN
83+ BASE_BRANCH : main # The branch the action should deploy from.
84+ BRANCH : gh-pages # The branch the action should deploy to.
85+ FOLDER : samples/BlazorWebAssembly/bin/Release/net5.0/publish/wwwroot # The folder the action should deploy.
86+ SINGLE_COMMIT : true
0 commit comments