Skip to content

Server (.NET) - Main #78

Server (.NET) - Main

Server (.NET) - Main #78

Workflow file for this run

name: Server (.NET) - Main
on: workflow_dispatch
jobs:
deploy-netfx:
strategy:
matrix:
include:
- name: 'WebApp Server / Default'
package: WebApp.Server.zip
app: sharplab
url: https://sharplab.io
environment: main-server
- name: x64
package: Server.zip
app: sl-a-core-x64
url: https://sl-a-core-x64.azurewebsites.net/status
environment: main-server-x64
- name: '.NET Framework, x86'
package: Server.NetFramework.zip
app: sl-a-netfx
url: https://sl-a-netfx.azurewebsites.net/status
environment: main-server-netfx
- name: '.NET Framework, x64'
package: Server.NetFramework.zip
app: sl-a-netfx-x64
url: https://sl-a-netfx-x64.azurewebsites.net/status
environment: main-server-netfx-x64
name: 'Deploy to Main (${{ matrix.name }})'
runs-on: ubuntu-latest
permissions:
id-token: write
environment: ${{ matrix.environment }}
steps:
- uses: actions/github-script@v6
id: get-release-tag
with:
script: |
return (await github.graphql(`{
repository(name: "SharpLab", owner: "ashmind") {
releases(orderBy: {field: CREATED_AT, direction: DESC}, first: 50) {
edges { node { tagName } }
}
}
}`)).repository.releases.edges
.map(e => e.node.tagName)
.find(t => t.startsWith('server-release-'));
result-encoding: string
- uses: dsaltares/fetch-gh-release-asset@9b9f2b2336797d56925bd755fb9033ece2b37f3c
with:
version: tags/${{ steps.get-release-tag.outputs.result }}
file: ${{ matrix.package }}
- uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: azure/webapps-deploy@v2
with:
app-name: ${{ matrix.app }}
package: ${{ matrix.package }}
- run: Invoke-RestMethod "${{ matrix.url }}" -MaximumRetryCount 10 -RetryIntervalSec 2
shell: pwsh