Bump Microsoft.AspNetCore.Components.WebAssembly.Server #365
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: eShopOnWeb Build and Test | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build-front-end: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.x' | |
include-prerelease: true | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.nuget/packages | |
!~/.nuget/packages/unwanted | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Build with dotnet | |
run: dotnet build ./eShopOnWeb.sln --configuration Release | |
- name: Test with dotnet | |
run: dotnet test ./eShopOnWeb.sln --configuration Release | |
- name: Publish with dotnet | |
run: dotnet publish ./src/Web/Web.csproj --configuration Release --output ${{ runner.temp }}/publish | |
- name: Upload artefact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build | |
path: ${{ runner.temp }}/publish | |
deploy-front-end: | |
concurrency: front-end | |
if: github.event_name != 'pull_request' | |
needs: build-front-end | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artefact | |
uses: actions/download-artifact@v2 | |
with: | |
name: build | |
path: ${{ runner.temp }}/build | |
- uses: azure/login@v1 | |
with: | |
creds: '${{ secrets.AZURE_CREDENTIALS }}' | |
- name: Web App settings | |
uses: Azure/appservice-settings@v1 | |
with: | |
app-name: 'eShop-gdbc' | |
app-settings-json: | | |
[ | |
{ | |
"name": "baseUrls:apiBase", | |
"value": "https://eshop-gdbc-backend.azurewebsites.net/" | |
}, | |
{ | |
"name": "baseUrls:webBase", | |
"value": "https://eshop-gdbc.azurewebsites.net/" | |
} | |
] | |
connection-strings-json: | | |
[ | |
] | |
- name: 'Run Azure webapp deploy action using publish profile credentials' | |
uses: azure/webapps-deploy@v2.1.5 | |
with: | |
app-name: 'eShop-gdbc' | |
publish-profile: ${{ secrets.publish_profile }} # Define secret variable in repository settings as per action documentation | |
package: ${{ runner.temp }}/build | |
build-back-end: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.x' | |
include-prerelease: true | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.nuget/packages | |
!~/.nuget/packages/unwanted | |
key: ${{ runner.os }}-backend-nuget-${{ hashFiles('**/packages.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-backend-nuget- | |
- name: Build with dotnet | |
run: dotnet build ./eShopOnWeb.sln --configuration Release | |
- name: Test with dotnet | |
run: dotnet test ./eShopOnWeb.sln --configuration Release | |
- name: Publish with dotnet | |
run: dotnet publish ./src/PublicApi/PublicApi.csproj --configuration Release --output ${{ runner.temp }}/publish | |
- name: Upload artefact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-backend | |
path: ${{ runner.temp }}/publish | |
deploy-back-end: | |
needs: build-back-end | |
if: github.event_name != 'pull_request' | |
concurrency: back-end | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artefact | |
uses: actions/download-artifact@v2 | |
with: | |
name: build-backend | |
path: ${{ runner.temp }}/build-backend | |
- uses: azure/login@v1 | |
with: | |
creds: '${{ secrets.AZURE_CREDENTIALS }}' | |
- name: Web App settings | |
uses: Azure/appservice-settings@v1 | |
with: | |
app-name: 'eShop-gdbc-backend' | |
app-settings-json: | | |
[ | |
] | |
connection-strings-json: | | |
[ | |
] | |
- name: 'Run Azure webapp deploy action using publish profile credentials' | |
uses: azure/webapps-deploy@v2.1.5 | |
with: | |
app-name: 'eShop-gdbc-backend' | |
publish-profile: ${{ secrets.publish_profile_backend }} # Define secret variable in repository settings as per action documentation | |
package: ${{ runner.temp }}/build-backend |