Skip to content

Commit cb47808

Browse files
committed
chore: repository setup with code copied from meshmodel repository
1 parent b5cd310 commit cb47808

20 files changed

+3518
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Calls a workflow that
2+
# + creates a new release branch from develop,
3+
# + raises version numbers semantically,
4+
# + merges the release branch into main,
5+
# + sets a version tag,
6+
# + generates release notes from commits and contributors,
7+
# + creates a support branch off the last release if necessary
8+
# + and publishes a NuGet.
9+
#
10+
# This workflow must be triggered manually.
11+
12+
name: Create & publish release from develop
13+
14+
on:
15+
workflow_dispatch:
16+
17+
jobs:
18+
release:
19+
# With @main we want the latest version. Consider using a version tag to avoid breaking changes.
20+
uses: ZEISS-PiWeb/github-actions/.github/workflows/create-release.yml@main
21+
with:
22+
generate_release_notes: true
23+
secrets: inherit
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Calls a workflow that
2+
# + runs on support branches only,
3+
# + raises version numbers semantically,
4+
# + sets a version tag,
5+
# + generates release notes from commits and contributors
6+
# + and publishes a NuGet.
7+
#
8+
# This workflow must be triggered manually.
9+
10+
name: Create & publish release from support branch
11+
12+
on:
13+
workflow_dispatch:
14+
15+
jobs:
16+
release:
17+
# With @main we want the latest version. Consider using a version tag to avoid breaking changes.
18+
uses: ZEISS-PiWeb/github-actions/.github/workflows/create-support-release.yml@main
19+
with:
20+
generate_release_notes: true
21+
secrets: inherit

.github/workflows/develop.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Calls a workflow that
2+
# + builds and tests the develop branch,
3+
# + packs and uploads a beta NuGet package.
4+
#
5+
# This workflow runs automatically on pushes or pull requests to develop.
6+
7+
name: Build, test & pack beta on develop
8+
9+
on:
10+
push:
11+
branches: [ develop ]
12+
pull_request:
13+
branches: [ develop ]
14+
15+
jobs:
16+
develop:
17+
# With @main we want the latest version. Consider using a version tag to avoid breaking changes.
18+
uses: ZEISS-PiWeb/github-actions/.github/workflows/develop.yml@main
19+
with:
20+
do_pack: true
21+
secrets: inherit
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Calls a workflow that
2+
# + builds and tests the chosen branch,
3+
# + packs an alpha NuGet package
4+
# + and stores the package as artifact.
5+
#
6+
# This workflow must be triggered manually.
7+
8+
name: Build, test & pack beta on fix or feature branch
9+
10+
on:
11+
workflow_dispatch:
12+
13+
jobs:
14+
publish-feature-branch:
15+
# With @main we want the latest version. Consider using a version tag to avoid breaking changes.
16+
uses: ZEISS-PiWeb/github-actions/.github/workflows/feature-branch.yml@main
17+
with:
18+
do_pack: true
19+
secrets: inherit
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: FOSS Compliance
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
defaults:
9+
run:
10+
working-directory: src
11+
12+
jobs:
13+
build_job:
14+
name: build solution
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
dotnet-version: [ '8.0.x' ]
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Setup .NET SDK ${{matrix.dotnet-version}}
23+
uses: actions/setup-dotnet@v2
24+
with:
25+
dotnet-version: ${{matrix.dotnet-version}}
26+
- name: Install dependencies
27+
run: dotnet restore
28+
- name: Build
29+
run: dotnet build --configuration Release --no-restore
30+
- name: Test
31+
run: dotnet test --configuration Release --no-build --verbosity normal
32+
- name: SCA scan
33+
run: |
34+
# Extract version number.
35+
cd ${{ github.workspace }}/src/ColorScale
36+
sudo apt install xmlstarlet
37+
version=$(xmlstarlet sel -t -m '//Version[1]' -v . -n <ColorScale.csproj)
38+
39+
# Run scan and upload binaries.
40+
cd ${{ github.workspace }}/software_composition_analysis
41+
bash <(curl -s -L https://detect.synopsys.com/detect7.sh) --blackduck.api.token=${{ secrets.BLACKDUCK_PAT }} --detect.project.version.name=$version --detect.source.path=${{ github.workspace }}/src/ColorScale/bin/Release/net8.0
42+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Run Software Composition Analysis with ORT
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
ort:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout project
11+
uses: actions/checkout@v4
12+
with:
13+
repository: 'ZEISS-PiWeb/PiWeb-ColorScale'
14+
- name: Run GitHub Action for ORT
15+
uses: oss-review-toolkit/ort-ci-github-action@v1
16+
with:
17+
allow-dynamic-versions: 'true'
18+
ort-cli-args: '-P ort.analyzer.enabledPackageManagers=Nuget'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,4 +395,5 @@ FodyWeavers.xsd
395395
*.msp
396396

397397
# JetBrains Rider
398+
.idea/
398399
*.sln.iml

LICENSE.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2024, ZEISS PiWeb
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

img/logo_128x128.png

3.96 KB
Loading

src/ColorScale.sln

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorScale", "ColorScale\ColorScale.csproj", "{ACC0C1AA-1C49-4630-B900-03F7496E2045}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
Release|Any CPU = Release|Any CPU
9+
EndGlobalSection
10+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
11+
{ACC0C1AA-1C49-4630-B900-03F7496E2045}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12+
{ACC0C1AA-1C49-4630-B900-03F7496E2045}.Debug|Any CPU.Build.0 = Debug|Any CPU
13+
{ACC0C1AA-1C49-4630-B900-03F7496E2045}.Release|Any CPU.ActiveCfg = Release|Any CPU
14+
{ACC0C1AA-1C49-4630-B900-03F7496E2045}.Release|Any CPU.Build.0 = Release|Any CPU
15+
EndGlobalSection
16+
EndGlobal

0 commit comments

Comments
 (0)