Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add pr workflow #2

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: PR

on:
pull_request:
workflow_dispatch:

jobs:
pr:
runs-on: windows-latest
permissions:
packages: read
contents: read
steps:
- name: Repository laden
uses: actions/checkout@v4

- name: .NET installieren
uses: actions/setup-dotnet@v4

- name: GitHub Package Manager registrieren
run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/co-IT/index.json"

- name: Install Tools
run: dotnet tool restore

- name: Install Dependencies
run: dotnet restore

- name: Lint
run: dotnet csharpier --check .

- name: Anwendung bauen
run: dotnet publish -c Release -r win-x64 ${{ github.workspace }}\coIT.Toolkit.Lexoffice.GdiExport.csproj --property:PublishProfile="FolderProfile"

- name: Installer bauen
uses: caphyon/[email protected]
with:
advinst-version: '21.9'
advinst-license: ${{ secrets.ADVINST_LICENSE_KEY }}
advinst-enable-automation: 'true'
aip-path: ${{ github.workspace }}\coIT.Toolkit.Lexoffice.GdiExport.Installer.aip
aip-build-name: DefaultBuild
aip-package-name: coIT.Toolkit.Lexoffice.GdiExport.Installer-0.0.0.msi
aip-output-dir: ${{ github.workspace }}\setup
aip-commands: |
SetVersion 0.0.0

- name: Update json erstellen
env:
VERSION: 0.0.0
run: |
# JSON String erstellen
$jsonString = '{"RegistryKey":"HKUD\\Software\\\\co-IT.eu GmbH\\Lexoffice Gdi Export\\Version", "Version":"' + $env:VERSION + '"}'

# Datei erstellen
$jsonString | Set-Content -Path advinst_update.json

# Dbug Ausgabe
Write-Output (Resolve-Path advinst_update.json)
Get-Content advinst_update.json
18 changes: 13 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
jobs:
publish:
runs-on: windows-latest
name: ClockodoQuickActions Installer Bauen
permissions:
packages: write
contents: write
Expand All @@ -23,9 +22,18 @@ jobs:
- name: GitHub Package Manager registrieren
run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/co-IT/index.json"

- name: Install Tools
run: dotnet tool restore

- name: Install Dependencies
run: dotnet restore

- name: Lint
run: dotnet csharpier --check .

- name: Anwendung bauen
run: dotnet publish -c Release -r win-x64 ${{ github.workspace }}\coIT.Toolkit.Lexoffice.GdiExport.csproj --property:PublishProfile="FolderProfile"

- name: Installer bauen
uses: caphyon/[email protected]
with:
Expand All @@ -38,7 +46,7 @@ jobs:
aip-output-dir: ${{ github.workspace }}\setup
aip-commands: |
SetVersion ${{github.ref_name}}

- name: Installer zu release hinzufügen
uses: svenstaro/upload-release-action@v2
with:
Expand All @@ -53,10 +61,10 @@ jobs:
run: |
# JSON String erstellen
$jsonString = '{"RegistryKey":"HKUD\\Software\\\\co-IT.eu GmbH\\Lexoffice Gdi Export\\Version", "Version":"' + $env:VERSION + '"}'

# Datei erstellen
$jsonString | Set-Content -Path advinst_update.json

# Dbug Ausgabe
Write-Output (Resolve-Path advinst_update.json)
Get-Content advinst_update.json
Expand Down
Loading