-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (56 loc) · 2.63 KB
/
clockodo-quickactions-veröffentlichen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Clockodo Quickactions bauen und Installer sowie Update erstellen
on:
push:
tags:
- 'clockodo-quick-actions-*'
jobs:
clockodo-quickactions-installer-erstellen:
runs-on: windows-latest
name: ClockodoQuickActions Installer Bauen
steps:
- name: Repository laden
uses: actions/checkout@v4
- name: .NET installieren
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Advanced installer einrichten
uses: caphyon/advinst-github-action@main
with:
advinst-version: '21.9'
advinst-license: ${{ secrets.ADVINST_LICENSE_KEY }}
- name: msbuild zu PATH hinzufügen
uses: microsoft/setup-msbuild@v2
- name: Version des neuen Installers festlegen
run: AdvancedInstaller.com /edit ${{ github.workspace }}\src\coIT.Clockodo.QuickActions.Installer\coIT.Clockodo.QuickActions.Installer.aip /SetVersion ("${{ github.ref }}" | cut -c 34-)
- name: Anwendung bauen
run: dotnet publish -c Release -r win-x64 ${{ github.workspace }}\src\coIT.Clockodo.QuickActions\coIT.Clockodo.QuickActions.csproj /p:PublishProfile="FolderProfile"
- name: Installer bauen
run: msbuild ${{ github.workspace }}\src\coIT.Clockodo.QuickActions.Installer\coIT.Clockodo.QuickActions.Installer.aiproj
- name: Installer zu release hinzufügen
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}\src\coIT.Clockodo.QuickActions.Installer\coIT.Clockodo.QuickActions.Installer-SetupFiles\coIT.Clockodo.QuickActions.Installer.msi
tag: ${{ github.ref }}
overwrite: true
- name: Update json erstellen
env:
VERSION: ${{ github.ref_name }}
run: |
# Erste 23 Buchstaben entfernen ("clockodo-quick-actions-")
$versionClean = $env:VERSION.Substring(23)
# JSON String erstellen
$jsonString = '{"RegistryKey":"HKUD\\Software\\\\co-IT.eu GmbH\\Clockodo QuickActions\\Version", "Version":"' + $versionClean + '"}'
# Datei erstellen
$jsonString | Set-Content -Path advinst_update.json
# Dbug Ausgabe
Write-Output (Resolve-Path advinst_update.json)
Get-Content advinst_update.json
- name: Update json zu Release hinzufügen
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}\advinst_update.json
tag: ${{ github.ref_name }}
overwrite: true