Skip to content

Bump System.Text.Json from 5.0.2 to 8.0.4 in /src/CognitiveServices.Explorer/CognitiveServices.Explorer.Application #204

Bump System.Text.Json from 5.0.2 to 8.0.4 in /src/CognitiveServices.Explorer/CognitiveServices.Explorer.Application

Bump System.Text.Json from 5.0.2 to 8.0.4 in /src/CognitiveServices.Explorer/CognitiveServices.Explorer.Application #204

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Dump GitHub context
run: echo Deployment for ${{ github.ref }}
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
# Use dev image in manifest.json and appsettings.json
- name: Find and Replace
if: github.ref == 'refs/heads/dev'
uses: jacobtomlinson/gha-find-replace@master
with:
find: "android-chrome-192x192.png"
replace: "android-chrome-192x192-dev.png"
# Replace values in appsettings.json (prod only)
- uses: microsoft/variable-substitution@v1
if: github.ref == 'refs/heads/master'
with:
files: '**/appsettings.json'
env:
App.IsDev: "false"
App.Environment: "Prod"
App.Title: "Cognitive Studio"
- name: Test
run: dotnet test ./src/CognitiveServices.Explorer/CognitiveServices.Explorer.sln --configuration Release
- name: Publish
run: dotnet publish ./src/CognitiveServices.Explorer/ -c Release -o ./dist/
- name: Azure Blob Storage Upload (production)
if: github.ref == 'refs/heads/master'
uses: bacongobbler/[email protected]
with:
# The name of the directory you want to upload
source_dir: ./dist/wwwroot/
# The name of the storage account container these assets will be uploaded to
container_name: $web
# The connection string for the storage account
connection_string: ${{secrets.AzureBlobStorageConnectionString}}
# extra arguments that can be passed to `az storage blob upload-batch`. Useful for passing flags like `--pattern` or `--destination-path`
#extra_args: # optional
- name: Azure Blob Storage Upload (dev)
if: github.ref == 'refs/heads/dev'
uses: bacongobbler/[email protected]
with:
# The name of the directory you want to upload
source_dir: ./dist/wwwroot/
# The name of the storage account container these assets will be uploaded to
container_name: $web
# The connection string for the storage account
connection_string: ${{secrets. AzureDevBlobStorageConnectionString}}
# extra arguments that can be passed to `az storage blob upload-batch`. Useful for passing flags like `--pattern` or `--destination-path`
#extra_args: # optional
- name: HTTP Request Action
uses: fjogeleit/[email protected]
with:
# Request URL
url: https://api.cloudflare.com/client/v4/zones/${{secrets.CloudFlareZoneId}}/purge_cache
# Request Method
method: POST
# Content Type
contentType: application/json
# Request Body as JSON String
data: "{\"purge_everything\":true}"
# Request Timeout in Sec
timeout: 360
# Bearer Authentication Token
bearerToken: ${{secrets.CloudFlareToken}}