Jelajahi Sumber

Ensure deterministic build for releases (#1780)

Marko Lahma 1 tahun lalu
induk
melakukan
4fe84ea436
2 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 1 1
      .github/workflows/build.yml
  2. 1 1
      .github/workflows/release.yml

+ 1 - 1
.github/workflows/build.yml

@@ -24,7 +24,7 @@ jobs:
       run: dotnet test --configuration Release --logger GitHubActions
       run: dotnet test --configuration Release --logger GitHubActions
 
 
     - name: Pack with dotnet
     - name: Pack with dotnet
-      run: dotnet pack Jint/Jint.csproj --output artifacts --configuration Release -p:VersionSuffix=preview-$GITHUB_RUN_NUMBER
+      run: dotnet pack Jint/Jint.csproj --output artifacts --configuration Release -p:VersionSuffix=preview-$GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=True
 
 
     - name: Push with dotnet
     - name: Push with dotnet
       run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.MYGET_API_KEY }} --skip-duplicate --source https://www.myget.org/F/jint/api/v2/package
       run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.MYGET_API_KEY }} --skip-duplicate --source https://www.myget.org/F/jint/api/v2/package

+ 1 - 1
.github/workflows/release.yml

@@ -26,7 +26,7 @@ jobs:
         VERSION="${arrTag[2]}"
         VERSION="${arrTag[2]}"
         VERSION="${VERSION//v}"
         VERSION="${VERSION//v}"
         echo "$VERSION"
         echo "$VERSION"
-        dotnet pack Jint/Jint.csproj --output artifacts --configuration Release -p:Version=$VERSION
+        dotnet pack Jint/Jint.csproj --output artifacts --configuration Release -p:Version=$VERSION -p:ContinuousIntegrationBuild=True
 
 
     - name: Push with dotnet
     - name: Push with dotnet
       run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
       run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json