File tree Expand file tree Collapse file tree 3 files changed +65
-0
lines changed
Expand file tree Collapse file tree 3 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Nuget Packages
2+
3+ on :
4+ push :
5+ branches : [ main, 'v[0-9].**' ]
6+ pull_request :
7+ branches : [ main, 'v[0-9].**' ]
8+
9+ jobs :
10+ build :
11+
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0
17+ filter : tree:0
18+
19+ - name : Install .NET
20+ uses : actions/setup-dotnet@v4
21+ with :
22+ dotnet-version : ' 8.0.x'
23+
24+ - name : pack nugets
25+ run : dotnet build -t:Pack OpenHarmony.NET.Compiler.Pack.nuproj -o ./packages -p:Version=0.0.0-alpha.${{github.run_number}} --property PackageCompressionLevel=Optimal
26+ - name : Upload a Build Artifact
27+ uses : actions/upload-artifact@v4
28+ with :
29+ name : packages
30+ path : packages
31+
32+ publish-to-nuget :
33+ needs : build
34+ runs-on : ubuntu-latest
35+ if : github.event_name == 'push'
36+ steps :
37+ - uses : actions/download-artifact@v4
38+ with :
39+ name : packages
40+ path : packages
41+ - name : Push to NuGet
42+ run : |
43+ dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
Original file line number Diff line number Diff line change 1+ <Project Sdk="Microsoft.Build.NoTargets">
2+ <PropertyGroup>
3+ <TargetFramework>net9.0</TargetFramework>
4+ <PackageId>OpenHarmony.NET.Compiler.Pack</PackageId>
5+ <Version>1.0</Version>
6+ <Authors>OpenHarmony.NET</Authors>
7+ <Company>OpenHarmony.NET</Company>
8+ <Description>MSBuild targets to aid in crosscompiling Native AOT publishing.</Description>
9+ <PackageProjectUrl>https://github.com/OpenHarmony.NET/OpenHarmony.NET.Compiler.Pack</PackageProjectUrl>
10+ </PropertyGroup>
11+
12+ <ItemGroup>
13+ <PackageReference Include="OpenHarmony.NET.PublishAotCross" Version="0.0.0-alpha.2" />
14+ <PackageReference Include="OpenHarmony.NET.Runtime" Version="0.0.0-alpha.19" />
15+ <PackageReference Include="PublishAotCross.Compiler" Version="0.0.0-alpha.27" />
16+ </ItemGroup>
17+ </Project>
Original file line number Diff line number Diff line change 1+ {
2+ "msbuild-sdks" : {
3+ "Microsoft.Build.NoTargets" : " 2.0.1"
4+ }
5+ }
You can’t perform that action at this time.
0 commit comments