diff --git a/.github/workflows/azure-static-web-apps-kind-ocean-0b86fe110.yml b/.github/workflows/azure-static-web-apps-kind-ocean-0b86fe110.yml new file mode 100644 index 00000000..8bd4e55f --- /dev/null +++ b/.github/workflows/azure-static-web-apps-kind-ocean-0b86fe110.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - main + +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 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_KIND_OCEAN_0B86FE110 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "./src/Cloud5mins.ShortenerTools.TinyBlazorAdmin" # App source code path + api_location: "" # Api source code path - optional + output_location: "wwwroot" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + 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_KIND_OCEAN_0B86FE110 }} + action: "close" diff --git a/src/Cloud5mins.ShortenerTools.Core/Cloud5mins.ShortenerTools.Core.csproj b/src/Cloud5mins.ShortenerTools.Core/Cloud5mins.ShortenerTools.Core.csproj index 1c4f3ea3..49c78842 100644 --- a/src/Cloud5mins.ShortenerTools.Core/Cloud5mins.ShortenerTools.Core.csproj +++ b/src/Cloud5mins.ShortenerTools.Core/Cloud5mins.ShortenerTools.Core.csproj @@ -1,13 +1,11 @@ - - net6.0 + net8.0 enable enable - + - - + \ No newline at end of file diff --git a/src/Cloud5mins.ShortenerTools.Functions/Cloud5mins.ShortenerTools.Functions.csproj b/src/Cloud5mins.ShortenerTools.Functions/Cloud5mins.ShortenerTools.Functions.csproj index 982a1b53..658f65fb 100644 --- a/src/Cloud5mins.ShortenerTools.Functions/Cloud5mins.ShortenerTools.Functions.csproj +++ b/src/Cloud5mins.ShortenerTools.Functions/Cloud5mins.ShortenerTools.Functions.csproj @@ -1,15 +1,17 @@ - net6.0 + net8.0 v4 Exe + enabled - + - - - + + + + @@ -23,4 +25,7 @@ Never - + + + + \ No newline at end of file diff --git a/src/Cloud5mins.ShortenerTools.Functions/Program.cs b/src/Cloud5mins.ShortenerTools.Functions/Program.cs index 067f42c6..5248902b 100644 --- a/src/Cloud5mins.ShortenerTools.Functions/Program.cs +++ b/src/Cloud5mins.ShortenerTools.Functions/Program.cs @@ -12,7 +12,7 @@ public static void Main() ShortenerSettings shortenerSettings = null; var host = new HostBuilder() - .ConfigureFunctionsWorkerDefaults() + .ConfigureFunctionsWebApplication() .ConfigureServices((context, services) => { // Add our global configuration instance diff --git a/src/Cloud5mins.ShortenerTools.TinyBlazorAdmin/Cloud5mins.ShortenerTools.TinyBlazorAdmin.csproj b/src/Cloud5mins.ShortenerTools.TinyBlazorAdmin/Cloud5mins.ShortenerTools.TinyBlazorAdmin.csproj index 0cca6eef..12b3e5d1 100644 --- a/src/Cloud5mins.ShortenerTools.TinyBlazorAdmin/Cloud5mins.ShortenerTools.TinyBlazorAdmin.csproj +++ b/src/Cloud5mins.ShortenerTools.TinyBlazorAdmin/Cloud5mins.ShortenerTools.TinyBlazorAdmin.csproj @@ -1,26 +1,22 @@ - - - net6.0 - disable - enable - Cloud5mins.ShortenerTools.TinyBlazorAdmin - portable - - - - - - - - - - - - - - - - - - + + net8.0 + disable + enable + Cloud5mins.ShortenerTools.TinyBlazorAdmin + portable + + + + + + + + + + + + + + + \ No newline at end of file