Disable static web asset fingerprinting #31
This file contains hidden or 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 WebApp (Blazor WebAssembly) | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, closed] | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
| inputs: | ||
| prod_release: | ||
| description: 'Do you want to release to production?' | ||
| required: true | ||
| default: false | ||
| type: boolean | ||
| jobs: | ||
| build_and_deploy_job: | ||
| if: ${{ inputs.prod_release }} || (github.event_name == 'pull_request' && github.event.action != 'closed') | ||
|
Check warning on line 21 in .github/workflows/azure-static-web-app.yml
|
||
| runs-on: ubuntu-latest | ||
| env: | ||
| DOTNET_VERSION: "net10.0" | ||
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
| PROJECT: "BlazorExpress.ChartJS.Demo.WebAssembly/BlazorExpress.ChartJS.Demo.WebAssembly.csproj" | ||
| BUILD_CONFIG: "Release" | ||
| name: Build and Deploy Job | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| lfs: false | ||
| # Setup .NET 10.0 | ||
| - name: Setup .NET 10.0 | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '10.0.x' | ||
| # .NET Restore | ||
| - name: .NET Restore | ||
| run: dotnet restore ${{ env.PROJECT }} | ||
| # .NET Build | ||
| - name: .NET Build | ||
| run: dotnet build ${{ env.PROJECT }} -c ${{ env.BUILD_CONFIG }} -f ${{ env.DOTNET_VERSION }} --no-restore | ||
| # .NET Publish | ||
| - name: .NET Publish | ||
| run: dotnet publish ${{ env.PROJECT }} -c ${{ env.BUILD_CONFIG }} -o output -f ${{ env.DOTNET_VERSION }} --no-build | ||
| # Azure Static Web App Deployment Action | ||
| - name: Build And Deploy Blazor WASM App | ||
| id: swa | ||
| uses: Azure/static-web-apps-deploy@v1 | ||
| with: | ||
| azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_WITTY_FOREST_0C3A9ED10 }} | ||
| repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) | ||
| action: "upload" | ||
| app_location: "output/wwwroot" # Path to your .csproj folder | ||
| api_location: "" # Leave empty if no API | ||
| output_location: "" # Leave empty when using 'upload' action with a pre-built app | ||
| skip_api_build: true | ||
| skip_app_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_STATIC_WEB_APPS_API_TOKEN_WITTY_FOREST_0C3A9ED10 }} | ||
| action: "close" | ||