Skip to content

Commit ca4e603

Browse files
authored
Merge pull request #108 from TraGicCode/stop-using-single-file-builds-due-to-incompatible-nuget-packages
Prevent using SingleFileBuilds
2 parents 15628ac + 00be9b6 commit ca4e603

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

.github/workflows/dotnet_selfcontained.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ jobs:
3737
--runtime ${{ matrix.os }} \
3838
--self-contained true \
3939
--output ./artifacts/binaries/${{ matrix.os }} \
40-
/p:PublishSingleFile=true
40+
--no-restore \
41+
-p:InformationalVersion=${{ steps.version.outputs.version }}
4142
4243
- name: Create Archive
4344
run: |

src/BuslyCLI.Console/Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,17 @@ COPY Directory.Build.props ./
99
# Copy project file and restore dependencies (better layer caching)
1010
COPY src/BuslyCLI.Console/BuslyCLI.Console.csproj ./BuslyCLI.Console/
1111
RUN dotnet restore "BuslyCLI.Console/BuslyCLI.Console.csproj" \
12-
-r linux-musl-x64
12+
--runtime linux-musl-x64
1313

1414
# Copy source code and build
1515
COPY src/BuslyCLI.Console/ ./BuslyCLI.Console/
1616

1717
RUN dotnet publish "./BuslyCLI.Console/BuslyCLI.Console.csproj" \
18-
-c Release \
19-
-r linux-musl-x64 \
20-
-o /app/publish \
18+
--configuration Release \
19+
--runtime linux-musl-x64 \
20+
--self-contained true \
21+
--output /app/publish \
2122
--no-restore \
22-
-p:PublishSingleFile=true \
23-
-p:PublishTrimmed=true \
24-
-p:TrimMode=partial \
25-
-p:EnableCompressionInSingleFile=true \
26-
-p:SelfContained=true \
2723
-p:InformationalVersion=$APP_VERSION
2824

2925
# Use minimal runtime for smaller image size

0 commit comments

Comments
 (0)