build(deps): bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0 #92
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: Azure Static Web Apps CI/CD | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: ["main"] | |
env: | |
DOTNET_VERSION: '8.x' | |
APP_PROJECT_FILE: 'src/Client/Client.csproj' | |
APP_OUTPUT_LOCATION: 'artifacts/client' | |
jobs: | |
build_and_deploy_job: | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') | |
runs-on: ubuntu-latest | |
name: Build and Deploy Job | |
environment: ${{ github.event_name == 'push' && 'Production' || 'Staging' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
lfs: false | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Install WASM build tools | |
run: dotnet workload install wasm-tools | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Verify formatting | |
run: dotnet format --verify-no-changes --no-restore | |
- name: Build solution | |
run: dotnet build -c Release --no-restore | |
- name: Test solution | |
run: dotnet test -c Release --no-restore --no-build | |
- name: Publish app project | |
run: dotnet publish ${{ env.APP_PROJECT_FILE }} -c Release -o ${{ env.APP_OUTPUT_LOCATION }} --no-restore --no-build | |
- name: Deploy static web app | |
id: deploy | |
uses: Azure/static-web-apps-deploy@v1 | |
env: | |
SKIP_DEPLOY_ON_MISSING_SECRETS: ${{ github.event_name == 'pull_request' }} | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_TOKEN }} | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
action: 'upload' | |
app_location: '${{ env.APP_OUTPUT_LOCATION }}/wwwroot' | |
skip_app_build: true | |
skip_api_build: true | |
close_pull_request_job: | |
if: github.event_name == 'pull_request' && github.event.action == 'closed' | |
runs-on: ubuntu-latest | |
name: Close Pull Request Job | |
steps: | |
- name: Close pull request | |
id: closepullrequest | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_TOKEN }} | |
action: 'close' | |
app_location: '' |