Adopt OCSentinel script layout and add Gitea workflow
Some checks failed
OfficeCom Sentinel Client / build-client (push) Has been cancelled
Some checks failed
OfficeCom Sentinel Client / build-client (push) Has been cancelled
This commit is contained in:
46
.gitea/workflows/client-build.yml
Normal file
46
.gitea/workflows/client-build.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
name: OfficeCom Sentinel Client
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-client:
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- windows
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "10.0.x"
|
||||
|
||||
- name: Build client package
|
||||
shell: pwsh
|
||||
run: |
|
||||
./build/build-client-package.ps1
|
||||
|
||||
- name: Build release manifest for tags
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
shell: pwsh
|
||||
run: |
|
||||
$tag = "${{ github.ref_name }}"
|
||||
$artifactUrl = "https://gitea.officecom.cloud/officecom/oc-sentinel/releases/download/$tag/OCSentinelClient-win-x64.zip"
|
||||
./build/build-release-manifest.ps1 -ArtifactUrl $artifactUrl
|
||||
|
||||
- name: Upload package artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ocsentinel-client-${{ github.sha }}
|
||||
path: |
|
||||
artifacts/OCSentinelClient-win-x64.zip
|
||||
artifacts/OCSentinelClient-win-x64.zip.sha256
|
||||
artifacts/version.json
|
||||
if-no-files-found: warn
|
||||
Reference in New Issue
Block a user