Add MudBlazor overflow menu to attendance grid rows #34
Workflow file for this run
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: Release & Deploy | |
| on: | |
| push: | |
| tags: [ 'v*.*.*' ] | |
| env: | |
| DOTNET_VERSION: '10.0.x' | |
| AZURE_WEBAPP_NAME: skojjt | |
| PROJECT_PATH: src/Skojjt.Web/Skojjt.Web.csproj | |
| permissions: | |
| contents: write # Required for creating GitHub Releases | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:18 | |
| env: | |
| POSTGRES_USER: skojjt | |
| POSTGRES_PASSWORD: test_password | |
| POSTGRES_DB: skojjt_test | |
| POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C.UTF-8 --lc-ctype=C.UTF-8" | |
| LANG: C.UTF-8 | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U skojjt" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test --configuration Release --no-build --verbosity normal | |
| env: | |
| ConnectionStrings__DefaultConnection: "Host=localhost;Port=5432;Database=skojjt_test;Username=skojjt;Password=test_password;Client Encoding=UTF8" | |
| - name: Publish | |
| run: dotnet publish ${{ env.PROJECT_PATH }} --configuration Release --no-build --output ./publish | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: webapp | |
| path: ./publish | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| environment: production | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: webapp | |
| path: ./publish | |
| - name: Deploy to Azure Web App | |
| uses: azure/webapps-deploy@v3 | |
| with: | |
| app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
| publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | |
| package: ./publish | |
| - name: Wait for application to restart | |
| run: | | |
| echo "Waiting for application to restart..." | |
| sleep 15 | |
| curl --fail --retry 10 --retry-delay 10 --retry-all-errors \ | |
| https://${{ env.AZURE_WEBAPP_NAME }}.azurewebsites.net/healthz \ | |
| && echo "Application is healthy" \ | |
| || echo "Health check did not return 200, check Azure logs" | |
| github-release: | |
| runs-on: ubuntu-latest | |
| needs: deploy | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract changelog for this version | |
| id: changelog | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| # Extract the section for this version from CHANGELOG.md | |
| NOTES=$(awk "/^## \[?${TAG}\]?/{found=1; next} /^## /{if(found) exit} found{print}" CHANGELOG.md) | |
| if [ -z "$NOTES" ]; then | |
| NOTES="Release ${GITHUB_REF_NAME}" | |
| fi | |
| # Use delimiter to handle multiline | |
| echo "NOTES<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$NOTES" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Skojjt ${{ github.ref_name }} | |
| body: ${{ steps.changelog.outputs.NOTES }} | |
| draft: false | |
| prerelease: false |