Skip to content

Commit 6578681

Browse files
committed
Adding pipeline
1 parent 1a7f130 commit 6578681

3 files changed

Lines changed: 185 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Publish to NuGet
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*' # e.g., v1.2.0
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v3
18+
with:
19+
dotnet-version: '8.0.x'
20+
21+
- name: Restore dependencies
22+
run: dotnet restore
23+
24+
- name: Build solution
25+
run: dotnet build --no-restore --configuration Release
26+
27+
- name: Run unit tests
28+
run: dotnet test ./tests --no-build --configuration Release --verbosity normal
29+
30+
publish:
31+
needs: build-and-test
32+
runs-on: ubuntu-latest
33+
outputs:
34+
version: ${{ steps.set-version.outputs.version }}
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v3
38+
39+
- name: Setup .NET
40+
uses: actions/setup-dotnet@v3
41+
with:
42+
dotnet-version: '8.0.x'
43+
44+
- name: Restore dependencies
45+
run: dotnet restore
46+
47+
- name: Build solution
48+
run: dotnet build --no-restore --configuration Release
49+
50+
- name: Extract version from tag
51+
id: set-version
52+
run: |
53+
VERSION="${GITHUB_REF#refs/tags/v}"
54+
echo "Using version: $VERSION"
55+
echo "version=$VERSION" >> $GITHUB_OUTPUT
56+
57+
- name: Pack NuGet packages
58+
run: |
59+
VERSION=${{ steps.set-version.outputs.version }}
60+
dotnet pack src/${{ github.event.repository.name }}.csproj \
61+
--configuration Release \
62+
--no-build \
63+
-p:PackageVersion=$VERSION \
64+
-p:IncludeSymbols=true \
65+
-p:SymbolPackageFormat=snupkg
66+
67+
- name: Show packed files
68+
run: ls -lh src/bin/Release
69+
70+
- name: Push NuGet packages
71+
run: |
72+
for pkg in $(find src/bin/Release -name "*.nupkg" ! -name "*.symbols.nupkg" ! -name "*.snupkg"); do
73+
echo "Pushing main package: $pkg"
74+
dotnet nuget push "$pkg" \
75+
--api-key "${{ secrets.NUGET_API_KEY }}" \
76+
--source https://api.nuget.org/v3/index.json \
77+
--skip-duplicate
78+
done
79+
80+
for symbols in $(find src/bin/Release -name "*.snupkg"); do
81+
echo "Pushing symbol package: $symbols"
82+
dotnet nuget push "$symbols" \
83+
--api-key "${{ secrets.NUGET_API_KEY }}" \
84+
--source https://api.nuget.org/v3/index.json \
85+
--skip-duplicate
86+
done

README.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Orbyss.Components.Json.Models
2+
3+
Shared models used by the Orbyss ecosystem for schema-driven UI rendering, such as JSON-based forms and data grids.
4+
This package is part of the [Orbyss.io](https://orbyss.io) open-source initiative to simplify UI generation for .NET applications.
5+
These shared models are used for translations and for handling dates and times using ticks rather than text.
6+
7+
💡 These models are consumed by other Orbyss components:
8+
- [Orbyss.Components.JsonForms](https://github.com/orbyss-io/Orbyss.Components.JsonForms)
9+
- [Orbyss.Components.Syncfusion.JsonDataGrid](https://github.com/orbyss-io/Orbyss.Components.Syncfusion.JsonDataGrid)
10+
11+
---
12+
13+
## 🧩 Models Included
14+
15+
### `DateTimeUtcTicks`
16+
17+
A readonly struct for UTC-based date-time representations.
18+
19+
```csharp
20+
public readonly struct DateTimeUtcTicks
21+
{
22+
public DateTimeOffset DateTime { get; }
23+
public long UtcTicks { get; }
24+
}
25+
```
26+
27+
### `DateUtcTicks`
28+
29+
A readonly struct for UTC-based date representations, including way to get the day range (00:00 - 23.59).
30+
31+
```csharp
32+
public readonly struct DateUtcTicks
33+
{
34+
public long UtcTicks { get; }
35+
public DateOnly DateOnly { get; }
36+
37+
public (DateTime start, DateTime end) GetDayRange();
38+
}
39+
```
40+
41+
42+
### `TranslationSchema`
43+
44+
This package also defines the shape of our i18n translation schema, compatible with tools like i18next or your own .NET localization pipeline.
45+
This structure allows you to localize field labels, enums, tooltips, and validation messages in dynamic forms or tables.
46+
47+
```json
48+
{
49+
"resources": {
50+
"en": {
51+
"translation": {
52+
"firstName": {
53+
"label": "First name",
54+
"error":{
55+
"minLength": "Must have more than ...",
56+
"maxLength": "Too many characters..."
57+
}
58+
},
59+
"personTypeEnum":{
60+
"label": "Person type",
61+
"FamilyType": "Family",
62+
"PartnerType": "Partner",
63+
"BusinessType": "Business"
64+
}
65+
}
66+
}
67+
}
68+
}
69+
```
70+
71+
---
72+
73+
## 🤝 Contributing
74+
75+
This project is open source and contributions are welcome!
76+
77+
Whether it's bug fixes, improvements, documentation, or ideas — we encourage developers to get involved.
78+
Just fork the repo, create a branch, and open a pull request.
79+
80+
We follow standard .NET open-source conventions:
81+
- Write clean, readable code
82+
- Keep PRs focused and descriptive
83+
- Open issues for larger features or discussions
84+
85+
No formal contribution guidelines — just be constructive and respectful.
86+
87+
---
88+
89+
## 🔗 Links
90+
91+
- 🌍 **Website**: [https://orbyss.io](https://orbyss.io)
92+
- 📦 **NuGet**: *Coming soon*
93+
- 🧑‍💻 **GitHub**: [https://github.com/Orbyss-io](https://github.com/orbyss-io)
94+
- 📝 **License**: [MIT](./LICENSE)
95+
96+
97+
---
98+
99+
⭐️ If you find this useful, [give us a star](https://github.com/orbyss-io/Orbyss.Components.Json.Models/stargazers) and help spread the word!

src/Orbyss.Components.Json.Models.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7-
<Version>1.0.1</Version>
87
<PackageId>Orbyss.Components.Json.Models</PackageId>
98
<Authors>Orbyss.io</Authors>
109
<Company>Orbyss</Company>
@@ -16,8 +15,6 @@
1615
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1716
<PackageReadmeFile>README.md</PackageReadmeFile>
1817
<PackageIcon>icon.png</PackageIcon>
19-
<IncludeSymbols>true</IncludeSymbols>
20-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2118
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2219
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2320

0 commit comments

Comments
 (0)