Bump Microsoft.AspNetCore.Mvc.Testing from 7.0.9 to 7.0.10 (#171) #310
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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
name: Build and deploy Pointer* | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
version: "2.0.${{ github.run_number }}" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.x' | |
- name: dotnet build | |
run: dotnet build --configuration Release --version "${{ env.version }}" | |
- name: dotnet test | |
run: dotnet test --configuration Release --no-build | |
- name: dotnet publish | |
run: dotnet publish -c Release -p:PublishDir=${{env.DOTNET_ROOT}}/publish | |
- name: Upload artifact for deployment job | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app | |
path: ${{env.DOTNET_ROOT}}/publish | |
deploy: | |
if: ${{ github.event_name != 'pull_request' }} | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: 'Production' | |
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
steps: | |
- name: Download artifact from build job | |
uses: actions/download-artifact@v3 | |
with: | |
name: app | |
- name: Deploy to Azure Web App | |
id: deploy-to-webapp | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: 'pointerstar' | |
slot-name: 'Production' | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }} | |
package: . |