Skip to content

Commit e775284

Browse files
committed
4.1.7 release
1 parent 0b7871d commit e775284

File tree

18 files changed

+441
-425
lines changed

18 files changed

+441
-425
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build manifest
2+
3+
description: This GitHub Action builds a manifest and uploads its artifacts.
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Update manifest.json
9+
shell: pwsh
10+
run: |
11+
$content = Get-Content -Path ${{env.FILE_PATH}}
12+
$content = $content -Replace '{{MICROSOFT_APP_ID}}', '${{env.MICROSOFT_APP_ID}}'
13+
$content = $content -Replace '{{AZURE_WEB_APP_DOMAIN_NAME}}', '${{env.AZURE_WEB_APP_DOMAIN_NAME}}'
14+
$content = $content -Replace "{{APP_VERSION}}", "${{env.BUILD_VERSION}}"
15+
Out-File -FilePath ${{env.FILE_PATH}} -InputObject $content -Encoding UTF8
16+
env:
17+
FILE_PATH: manifest/manifest.json
18+
- name: Upload artifacts
19+
uses: actions/upload-artifact@v4
20+
with:
21+
name: manifest
22+
path: manifest
23+
include-hidden-files: true
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Build source
2+
3+
description: This GitHub Action builds sources and uploads its artifacts.
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Setup Node.js 22.x
9+
uses: actions/setup-node@v4
10+
with:
11+
node-version: 22.x
12+
- name: Setup .NET Core
13+
uses: actions/setup-dotnet@v4
14+
with:
15+
dotnet-version: 8.x
16+
- name: Update microsoft-identity-association.json
17+
shell: pwsh
18+
run: |
19+
$content = Get-Content -Path ${{env.FILE_PATH}}
20+
$content = $content -Replace "{{MICROSOFT_APP_ID}}", "${{env.MICROSOFT_APP_ID}}"
21+
Out-File -FilePath ${{env.FILE_PATH}} -InputObject $content -Encoding UTF8
22+
env:
23+
FILE_PATH: source/client/public/.well-known/microsoft-identity-association.json
24+
- name: Update .env
25+
shell: pwsh
26+
run: |
27+
$content = Get-Content -Path ${{env.FILE_PATH}}
28+
$content = $content -Replace "{{AZURE_FUNCTION_APP_DOMAIN_NAME}}", "${{env.AZURE_FUNCTION_APP_DOMAIN_NAME}}"
29+
$content = $content -Replace "{{TELEMETRY_CONNECTION_STRING}}", "${{env.TELEMETRY_CONNECTION_STRING}}"
30+
Out-File -FilePath ${{env.FILE_PATH}} -InputObject $content -Encoding UTF8
31+
env:
32+
FILE_PATH: source/client/.env
33+
- name: Update package.json
34+
shell: pwsh
35+
run: npm version ${{env.BUILD_VERSION}} --no-git-tag-version
36+
working-directory: source/client
37+
- name: Restore client
38+
shell: pwsh
39+
run: npm ci
40+
working-directory: source/client
41+
- name: Audit client
42+
shell: pwsh
43+
run: npm audit --omit=dev
44+
working-directory: source/client
45+
- name: Restore server
46+
shell: pwsh
47+
run: dotnet restore
48+
working-directory: source/server
49+
- name: Build web
50+
shell: pwsh
51+
run: |
52+
dotnet publish `
53+
Karamem0.Commistant.Web/Karamem0.Commistant.Web.csproj `
54+
-c Release `
55+
-p:PublishDir=${{github.workspace}}/source/server/build/web `
56+
-p:Version=${{env.BUILD_VERSION}}.${{github.run_number}} `
57+
-p:FileVersion=${{env.BUILD_VERSION}}.${{github.run_number}}
58+
working-directory: source/server
59+
- name: Build function
60+
shell: pwsh
61+
run: |
62+
dotnet publish `
63+
Karamem0.Commistant.Function/Karamem0.Commistant.Function.csproj `
64+
-c Release `
65+
-p:PublishDir=${{github.workspace}}/source/server/build/function `
66+
-p:Version=${{env.BUILD_VERSION}}.${{github.run_number}} `
67+
-p:FileVersion=${{env.BUILD_VERSION}}.${{github.run_number}}
68+
working-directory: source/server
69+
- name: Upload artifacts
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: build
73+
path: source/server/build
74+
include-hidden-files: true
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Deploy to Azure
2+
3+
description: This GitHub Action deploys built artifacts to Azure.
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Download artifacts
9+
uses: actions/download-artifact@v4
10+
with:
11+
name: build
12+
path: build
13+
- name: Connect to Azure
14+
uses: azure/login@a65d910e8af852a8061c627c456678983e180302
15+
with:
16+
creds: ${{env.AZURE_CREDENTIALS}}
17+
- name: Deploy web
18+
uses: azure/webapps-deploy@de617f46172a906d0617bb0e50d81e9e3aec24c8
19+
with:
20+
app-name: ${{env.AZURE_WEB_APP_NAME}}
21+
package: build/web
22+
- name: Deploy function
23+
uses: azure/webapps-deploy@de617f46172a906d0617bb0e50d81e9e3aec24c8
24+
with:
25+
app-name: ${{env.AZURE_FUNCTION_APP_NAME}}
26+
package: build/function
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy to GitHub Release
2+
3+
description: This GitHub Action deploys built artifacts to GitHub Release.
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Download artifatcs
9+
uses: actions/download-artifact@v4
10+
with:
11+
name: manifest
12+
path: manifest
13+
- name: Archive artifatcs
14+
shell: pwsh
15+
run: Compress-Archive -Path manifest/* -DestinationPath Commistant_${{env.BUILD_VERSION}}.zip
16+
- name: Create release
17+
uses: softprops/action-gh-release@v2
18+
env:
19+
GITHUB_TOKEN: ${{env.GITHUB_TOKEN}}
20+
with:
21+
files: Commistant_${{env.BUILD_VERSION}}.zip
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test source
2+
3+
description: This GitHub Action tests sources and uploads reports
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Setup .NET Core
9+
uses: actions/setup-dotnet@v4
10+
with:
11+
dotnet-version: 8.x
12+
- name: Test source
13+
shell: pwsh
14+
run: |
15+
dotnet test `
16+
Karamem0.Commistant.Test/Karamem0.Commistant.Test.csproj `
17+
-p:AltCover=true `
18+
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
19+
working-directory: source/server
20+
- name: Test results
21+
uses: enricomi/publish-unit-test-result-action/linux@v2
22+
if: always()
23+
with:
24+
files: source/server/test/*.xml
25+
check_name: Bot test results
26+
- name: Upload coverage reports
27+
uses: codecov/codecov-action@v4
28+
if: always()
29+
with:
30+
fail_ci_if_error: true
31+
token: ${{env.CODECOV_TOKEN}}
32+
slug: karamem0/commistant

.github/workflows/build-manifest.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/build-source.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

.github/workflows/deploy-to-azure.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/deploy-to-github-release.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/test-source.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)