Skip to content

Commit f1e3aa8

Browse files
committed
fix: restore publish workflow restore step and set PublishTrimmed at restore time
1 parent decd4af commit f1e3aa8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ jobs:
1919
with:
2020
dotnet-version: 10.0.x
2121

22+
- name: Restore dependencies
23+
# need to set /p:PublishTrimmed here as well because --no-restore on the publish step causes trimming to silently fail
24+
# https://github.com/dotnet/sdk/issues/37049
25+
run: dotnet restore --locked-mode /p:PublishTrimmed=true
26+
2227
- name: Publish
2328
env:
2429
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
25-
run: dotnet publish AutoTag.CLI -r ${{ matrix.dotnet-runtime }} -c Release --locked-mode
30+
run: dotnet publish AutoTag.CLI -r ${{ matrix.dotnet-runtime }} -c Release --no-restore
2631

2732
- name: Upload
2833
env:

0 commit comments

Comments
 (0)