diff --git a/build.fsx b/build.fsx
index db2ac8dd5..46a068639 100644
--- a/build.fsx
+++ b/build.fsx
@@ -61,7 +61,7 @@ pipeline "Build" {
stage "Build" { run "dotnet build -c Release --tl" }
stage "UnitTests" { run "dotnet test -c Release --tl" }
stage "Pack" { run "dotnet pack --no-restore -c Release --tl" }
- stage "Publish" { run "dotnet publish --no-restore -r linux-x64 -c Release" }
+ stage "PublishAOT" { run "dotnet publish src/Fantomas/Fantomas.fsproj -r linux-x64 -c Release -p:DoPublishAot=yes --tl" }
stage "Docs" {
whenNot { platformOSX }
envVars
diff --git a/src/Fantomas/Fantomas.fsproj b/src/Fantomas/Fantomas.fsproj
index e2a37bc04..85e86f40c 100644
--- a/src/Fantomas/Fantomas.fsproj
+++ b/src/Fantomas/Fantomas.fsproj
@@ -12,7 +12,7 @@
true
Fantomas
false
- true
+ true