Skip to content

Commit d0b6df9

Browse files
authored
Improve Nuget spec (#73)
* Bump version to 23.7.1 * Change <Copyright> * Add link to repository * Change <Authors> * Deterministic package build Set ContinuousIntegrationBuild with env * Use --warnaserror * Separate pack workflow * Do not use PDB * Update packages
1 parent 0b4a715 commit d0b6df9

File tree

13 files changed

+91
-30
lines changed

13 files changed

+91
-30
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.vs/
2+
**/bin/
3+
**/obj/
4+
*.nupkg

.github/workflows/check-badges.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
build-and-test:
10+
check-badges:
1111
runs-on: ubuntu-latest
1212

1313
steps:

.github/workflows/dotnet-core.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup latest version of dotnet
3030
uses: actions/setup-dotnet@v3
3131
- name: Build with latest version
32-
run: dotnet build
32+
run: dotnet build --warnaserror
3333

3434
- name: Setup ${{ matrix.dotnet-version }} version of dotnet
3535
uses: actions/setup-dotnet@v3
@@ -40,13 +40,3 @@ jobs:
4040
run: dotnet test --no-build --verbosity normal --framework ${{ matrix.framework }}
4141
env:
4242
TEST_CONFIGURATION_JWT_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }}
43-
44-
docker-build:
45-
needs: [ build-and-test ]
46-
47-
runs-on: ubuntu-latest
48-
49-
steps:
50-
- uses: actions/checkout@v3
51-
- name: Build the Docker image
52-
run: docker build . --file Dockerfile

.github/workflows/pack.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Pack into Nuget package
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
pack-nuget:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Build the Docker image
16+
run: docker build . --file Dockerfile

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ FROM mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim AS sdk
22

33
FROM sdk AS pack
44
WORKDIR /src
5+
RUN dotnet tool install -g sourcelink
56
COPY . .
6-
RUN dotnet build --configuration=Release
7-
RUN dotnet pack --no-build --configuration=Release --output=/package Aspose.BarCode.Cloud.Sdk.sln
7+
RUN ./scripts/pack-nuget.bash /package
8+
RUN ./scripts/test-nuget.bash "$(ls /package/Aspose.BarCode-Cloud.*.nupkg)"
89

910
FROM sdk AS final
1011
WORKDIR /packed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ update:
3333

3434
.PHONY: lint
3535
lint:
36-
dotnet build
36+
dotnet build --warnaserror
3737

3838
.PHONY: clean
3939
clean:
4040
find . -depth -type d \( -name obj -o -name bin -o -name TestResults \) -exec rm -rf "{}" \; || true
41+
42+
.PHONY: nuget
43+
nuget:
44+
./scripts/pack-nuget.bash
45+
./scripts/test-nuget.bash

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Nuget](https://img.shields.io/nuget/v/Aspose.BarCode-Cloud)](https://www.nuget.org/packages/Aspose.BarCode-Cloud/)
77

88
- API version: 3.0
9-
- SDK version: 23.7.0
9+
- SDK version: 23.7.1
1010

1111
## Demo applications
1212

Tests/Aspose.BarCode.Cloud.Sdk.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<None Remove="TestResults\**" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<PackageReference Include="Moq" Version="4.18.4" />
15+
<PackageReference Include="Moq" Version="4.20.69" />
1616
<PackageReference Include="NUnit" Version="3.13.3" />
17-
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
18-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
17+
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
18+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
1919
<PackageReference Include="System.Net.Http" Version="4.3.4" />
2020
</ItemGroup>
2121
<ItemGroup>

examples/GenerateQR/GenerateQR.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Aspose.BarCode-Cloud" Version="23.7.0" />
9+
<PackageReference Include="Aspose.BarCode-Cloud" Version="23.7.1" />
1010
</ItemGroup>
1111

1212
</Project>

examples/ReadQR/ReadQR.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Aspose.BarCode-Cloud" Version="23.7.0" />
9+
<PackageReference Include="Aspose.BarCode-Cloud" Version="23.7.1" />
1010
</ItemGroup>
1111

1212
</Project>

0 commit comments

Comments
 (0)