File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main, master]
6+ pull_request :
7+ branches : [main, master]
8+
9+ env :
10+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
11+ DOTNET_NOLOGO : true
12+ DOTNET_CLI_TELEMETRY_OPTOUT : 1
13+
14+ jobs :
15+ build :
16+ runs-on : ${{ matrix.os }}
17+
18+ strategy :
19+ matrix :
20+ os : [ubuntu-latest, windows-latest, macos-latest]
21+
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+
26+ - name : Setup .NET
27+ uses : actions/setup-dotnet@v4
28+ with :
29+ dotnet-version : ' 9.0.x'
30+
31+ - name : Restore dependencies
32+ run : dotnet restore
33+
34+ - name : Build
35+ run : dotnet build --configuration Release --no-restore
36+
37+ - name : Pack (verify packaging works)
38+ run : dotnet pack src/ObsKit.NET/ObsKit.NET.csproj --configuration Release --no-build --output ./nupkg
Original file line number Diff line number Diff line change 1+ name : Release to NuGet
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' Version to release (e.g., 0.0.1)'
8+ required : true
9+ type : string
10+
11+ env :
12+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
13+ DOTNET_NOLOGO : true
14+ DOTNET_CLI_TELEMETRY_OPTOUT : 1
15+
16+ jobs :
17+ release :
18+ runs-on : ubuntu-latest
19+ permissions :
20+ contents : write
21+
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+
26+ - name : Setup .NET
27+ uses : actions/setup-dotnet@v4
28+ with :
29+ dotnet-version : ' 9.0.x'
30+
31+ - name : Restore dependencies
32+ run : dotnet restore
33+
34+ - name : Build
35+ run : dotnet build --configuration Release --no-restore -p:Version=${{ inputs.version }}
36+
37+ - name : Pack
38+ run : dotnet pack src/ObsKit.NET/ObsKit.NET.csproj --configuration Release --no-build -p:PackageVersion=${{ inputs.version }} --output ./nupkg
39+
40+ - name : Push to NuGet
41+ run : dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
42+
43+ - name : Create tag
44+ run : |
45+ git config user.name "github-actions[bot]"
46+ git config user.email "github-actions[bot]@users.noreply.github.com"
47+ git tag "v${{ inputs.version }}"
48+ git push origin "v${{ inputs.version }}"
49+
50+ - name : Create GitHub Release
51+ uses : softprops/action-gh-release@v2
52+ with :
53+ tag_name : v${{ inputs.version }}
54+ name : v${{ inputs.version }}
55+ body : |
56+ ## ObsKit.NET v${{ inputs.version }}
57+
58+ Install via NuGet:
59+ ```
60+ dotnet add package ObsKit.NET --version ${{ inputs.version }}
61+ ```
62+
63+ Or via Package Manager:
64+ ```
65+ Install-Package ObsKit.NET -Version ${{ inputs.version }}
66+ ```
67+ files : ./nupkg/*.nupkg
68+ generate_release_notes : true
Original file line number Diff line number Diff line change 1515 <PackageTags >obs;obs-studio;streaming;recording;video;capture;screen-recording</PackageTags >
1616
1717 <!-- Version -->
18- <Version >0.1.0 </Version >
19- <AssemblyVersion >0.1.0 .0</AssemblyVersion >
20- <FileVersion >0.1.0 .0</FileVersion >
18+ <Version >0.0.1 </Version >
19+ <AssemblyVersion >0.0.1 .0</AssemblyVersion >
20+ <FileVersion >0.0.1 .0</FileVersion >
2121 </PropertyGroup >
2222</Project >
Original file line number Diff line number Diff line change 77 <NoWarn >$(NoWarn);CS1591</NoWarn >
88 <PackageId >ObsKit.NET</PackageId >
99 <PackageReadmeFile >README.md</PackageReadmeFile >
10+ <PackageProjectUrl >https://github.com/Segra/ObsKit.NET</PackageProjectUrl >
1011 <RepositoryUrl >https://github.com/Segra/ObsKit.NET</RepositoryUrl >
1112 <RepositoryType >git</RepositoryType >
1213 </PropertyGroup >
You can’t perform that action at this time.
0 commit comments