Skip to content

Commit bced945

Browse files
authored
Release/v1.0.0 (#1)
* - Release v1.0.0
1 parent 9c33624 commit bced945

File tree

4 files changed

+283
-26
lines changed

4 files changed

+283
-26
lines changed

.github/workflows/release-ci.yml

Lines changed: 69 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
tags:
88
- 'v*'
99

10+
# Cancel in-progress runs on the same branch when a new push arrives
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1015
jobs:
1116
release:
1217
name: Build, Pack & Publish
@@ -15,6 +20,34 @@ jobs:
1520
contents: read
1621
packages: write
1722

23+
services:
24+
sqlserver:
25+
image: mcr.microsoft.com/mssql/server:2022-latest
26+
env:
27+
ACCEPT_EULA: "Y"
28+
MSSQL_SA_PASSWORD: "Pa55w0rd!"
29+
ports:
30+
- 1433:1433
31+
options: >-
32+
--health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'Pa55w0rd!' -No -Q 'SELECT 1'"
33+
--health-interval 10s
34+
--health-timeout 5s
35+
--health-retries 10
36+
37+
postgres:
38+
image: postgres:16-alpine
39+
env:
40+
POSTGRES_USER: postgres
41+
POSTGRES_PASSWORD: Pa55w0rd
42+
POSTGRES_DB: postgres
43+
ports:
44+
- 5455:5432
45+
options: >-
46+
--health-cmd pg_isready
47+
--health-interval 10s
48+
--health-timeout 5s
49+
--health-retries 5
50+
1851
steps:
1952
- name: Checkout
2053
uses: actions/checkout@v4
@@ -35,16 +68,17 @@ jobs:
3568
- name: Set package version
3669
id: pkg_version
3770
run: |
38-
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
39-
echo "version=${{ steps.gitversion.outputs.majorMinorPatch }}" >> $GITHUB_OUTPUT
71+
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
72+
echo "version=$(echo '${{ github.ref_name }}' | sed 's/^v//')" >> $GITHUB_OUTPUT
4073
else
4174
echo "version=${{ steps.gitversion.outputs.semVer }}" >> $GITHUB_OUTPUT
4275
fi
4376
4477
- name: Print version
4578
run: |
46-
echo "SemVer : ${{ steps.gitversion.outputs.semVer }}"
79+
echo "SemVer : ${{ steps.gitversion.outputs.semVer }}"
4780
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
81+
echo "PreReleaseTag : ${{ steps.gitversion.outputs.preReleaseTag }}"
4882
echo "Package version: ${{ steps.pkg_version.outputs.version }}"
4983
5084
- name: Setup .NET
@@ -56,45 +90,67 @@ jobs:
5690
10.0.x
5791
5892
- name: Restore
59-
run: dotnet restore ActiveForge/ActiveForge.sln
93+
run: dotnet restore ActiveForge.sln
6094

6195
- name: Build
62-
run: dotnet build ActiveForge/ActiveForge.sln --configuration Release --no-restore
96+
run: dotnet build ActiveForge.sln --configuration Release --no-restore
97+
98+
- name: Start MongoDB replica set
99+
run: |
100+
docker run -d --name mongo \
101+
-p 27017:27017 \
102+
mongo:7 --replSet rs0 --bind_ip_all
103+
# Wait for mongod to accept connections
104+
for i in $(seq 1 30); do
105+
docker exec mongo mongosh --quiet --eval "db.adminCommand('ping')" \
106+
&& break || sleep 2
107+
done
108+
# Initialise the single-node replica set
109+
docker exec mongo mongosh --quiet --eval \
110+
"rs.initiate({_id:'rs0',members:[{_id:0,host:'127.0.0.1:27017'}]})"
111+
# Wait until the node becomes PRIMARY
112+
for i in $(seq 1 20); do
113+
STATUS=$(docker exec mongo mongosh --quiet --eval "rs.status().myState")
114+
[ "$STATUS" = "1" ] && break || sleep 2
115+
done
63116
64117
- name: Test
65-
run: dotnet test ActiveForge/ActiveForge.sln --configuration Release --no-build --framework net8.0
118+
env:
119+
SS_ADMIN_CONNSTR: "Server=localhost,1433;Database=master;User Id=sa;Password=Pa55w0rd!;TrustServerCertificate=True"
120+
PG_ADMIN_CONNSTR: "Host=localhost;Port=5455;Database=postgres;Username=postgres;Password=Pa55w0rd"
121+
run: dotnet test ActiveForge.sln --configuration Release --no-build --framework net8.0
66122

67123
- name: Pack — Core
68124
run: |
69-
dotnet pack ActiveForge/src/ActiveForge/ActiveForge.csproj \
125+
dotnet pack src/ActiveForge/ActiveForge.csproj \
70126
--configuration Release --no-build \
71127
-p:PackageVersion=${{ steps.pkg_version.outputs.version }} \
72128
--output ./artifacts
73129
74130
- name: Pack — SqlServer
75131
run: |
76-
dotnet pack ActiveForge/src/ActiveForge.SqlServer/ActiveForge.SqlServer.csproj \
132+
dotnet pack src/ActiveForge.SqlServer/ActiveForge.SqlServer.csproj \
77133
--configuration Release --no-build \
78134
-p:PackageVersion=${{ steps.pkg_version.outputs.version }} \
79135
--output ./artifacts
80136
81137
- name: Pack — PostgreSQL
82138
run: |
83-
dotnet pack ActiveForge/src/ActiveForge.PostgreSQL/ActiveForge.PostgreSQL.csproj \
139+
dotnet pack src/ActiveForge.PostgreSQL/ActiveForge.PostgreSQL.csproj \
84140
--configuration Release --no-build \
85141
-p:PackageVersion=${{ steps.pkg_version.outputs.version }} \
86142
--output ./artifacts
87143
88144
- name: Pack — SQLite
89145
run: |
90-
dotnet pack ActiveForge/src/ActiveForge.SQLite/ActiveForge.SQLite.csproj \
146+
dotnet pack src/ActiveForge.SQLite/ActiveForge.SQLite.csproj \
91147
--configuration Release --no-build \
92148
-p:PackageVersion=${{ steps.pkg_version.outputs.version }} \
93149
--output ./artifacts
94150
95151
- name: Pack — MongoDB
96152
run: |
97-
dotnet pack ActiveForge/src/ActiveForge.MongoDB/ActiveForge.MongoDB.csproj \
153+
dotnet pack src/ActiveForge.MongoDB/ActiveForge.MongoDB.csproj \
98154
--configuration Release --no-build \
99155
-p:PackageVersion=${{ steps.pkg_version.outputs.version }} \
100156
--output ./artifacts
@@ -104,14 +160,9 @@ jobs:
104160

105161
- name: Publish to GitHub Packages
106162
run: |
107-
dotnet nuget add source \
108-
--username ${{ github.repository_owner }} \
109-
--password ${{ secrets.GITHUB_TOKEN }} \
110-
--store-password-in-clear-text \
111-
--name github \
112-
"https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
113163
dotnet nuget push "./artifacts/*.nupkg" \
114-
--source github \
164+
--api-key ${{ secrets.GITHUB_TOKEN }} \
165+
--source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
115166
--skip-duplicate
116167
117168
- name: Publish to NuGet.org

ActiveForge.sln

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio Version 18
3-
VisualStudioVersion = 18.2.11415.280 d18.0
3+
VisualStudioVersion = 18.2.11415.280
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ActiveForge", "src\ActiveForge\ActiveForge.csproj", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}"
66
EndProject
@@ -31,11 +31,20 @@ EndProject
3131
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{D54AC37D-D3E3-48A9-BDFE-4C19404F7C00}"
3232
EndProject
3333
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{D6383414-22E9-4C28-8500-8963CB6942DF}"
34+
ProjectSection(SolutionItems) = preProject
35+
.gitignore = .gitignore
36+
GitVersion.yml = GitVersion.yml
37+
LICENSE = LICENSE
38+
README.md = README.md
39+
EndProjectSection
3440
EndProject
3541
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github", "github", "{45231C39-1C92-4264-982D-6B40708CA0BD}"
3642
ProjectSection(SolutionItems) = preProject
3743
.gitignore = .gitignore
3844
.github\workflows\master-build.yml = .github\workflows\master-build.yml
45+
.github\workflows\master-codeql.yml = .github\workflows\master-codeql.yml
46+
.github\workflows\release-ci.yml = .github\workflows\release-ci.yml
47+
.github\workflows\release-codeql.yml = .github\workflows\release-codeql.yml
3948
EndProjectSection
4049
EndProject
4150
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{497629F0-306C-4BC9-99D1-B5C6EA2B2E6F}"

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,19 @@ ActiveForge streamlines data-centric development with a cohesive approach to ent
7575
---
7676

7777
## Requirements
78-
79-
- .NET 8.0
80-
- One provider package:
81-
- SQL Server → `ActiveForge.SqlServer` (wraps `Microsoft.Data.SqlClient` 5.2.1)
82-
- PostgreSQL → `ActiveForge.PostgreSQL` (wraps `Npgsql` 8.0.3)
83-
- MongoDB → `ActiveForge.MongoDB` (wraps `MongoDB.Driver` 2.28.0)
84-
- SQLite → `ActiveForge.SQLite` (wraps `Microsoft.Data.Sqlite` 8.0.0)
78+
┌────────────┬──────────────────────────────────────────────────────────────────────────────────────────────┐
79+
│ Project │ Targets │
80+
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────┤
81+
│ Core │ net8.0;net9.0;net10.0;net472;netstandard2.0;netstandard2.1 │
82+
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────┤
83+
│ SqlServer │ net8.0;net9.0;net10.0;net472;netstandard2.0;netstandard2.1 │
84+
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────┤
85+
│ PostgreSQL │ net8.0;net9.0;net10.0 — Npgsql 8 limits this │
86+
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────┤
87+
│ SQLite │ net8.0;net9.0;net10.0;netstandard2.0;netstandard2.1 — net472 excluded (native binaries risk) │
88+
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────┤
89+
│ MongoDB │ net8.0;net9.0;net10.0;net472;netstandard2.0;netstandard2.1 │
90+
└────────────┴──────────────────────────────────────────────────────────────────────────────────────────────┘
8591

8692
---
8793

0 commit comments

Comments
 (0)