try a few things to fix source link

This commit is contained in:
Caelan Sayler
2024-05-24 11:24:14 +01:00
parent b1cc241ed9
commit 2c1cb6cba9
4 changed files with 13 additions and 11 deletions

View File

@@ -103,7 +103,6 @@ jobs:
VELOPACK_GITHUB_TEST_TOKEN: ${{ secrets.VELOPACK_GITHUB_TEST_TOKEN }} VELOPACK_GITHUB_TEST_TOKEN: ${{ secrets.VELOPACK_GITHUB_TEST_TOKEN }}
VELOPACK_B2_TEST_TOKEN: ${{ secrets.VELOPACK_B2_TEST_TOKEN }} VELOPACK_B2_TEST_TOKEN: ${{ secrets.VELOPACK_B2_TEST_TOKEN }}
VELOPACK_AZ_TEST_TOKEN: ${{ secrets.VELOPACK_AZ_TEST_TOKEN }} VELOPACK_AZ_TEST_TOKEN: ${{ secrets.VELOPACK_AZ_TEST_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for gh cli
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@@ -129,6 +128,8 @@ jobs:
run: dotnet build -c Release run: dotnet build -c Release
- name: Wait for artifacts - name: Wait for artifacts
shell: pwsh shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for gh cli
run: | run: |
# Wait 15 minutes for the artifact to become available # Wait 15 minutes for the artifact to become available
$artifactName = "rust-${{ matrix.os }}" $artifactName = "rust-${{ matrix.os }}"
@@ -138,23 +139,20 @@ jobs:
$workflowRunId = $env:GITHUB_RUN_ID $workflowRunId = $env:GITHUB_RUN_ID
Write-Host "Waiting for artifact '$artifactName' to become available in workflow run $workflowRunId..." Write-Host "Waiting for artifact '$artifactName' to become available in workflow run $workflowRunId..."
while ($attempt -lt $maxAttempts) { while ($attempt -lt $maxAttempts) {
Write-Host "Checking for artifact '$artifactName', attempt $($attempt + 1)/$maxAttempts"
$artifactsJson = gh api repos/$env:GITHUB_REPOSITORY/actions/runs/$workflowRunId/artifacts $artifactsJson = gh api repos/$env:GITHUB_REPOSITORY/actions/runs/$workflowRunId/artifacts
$artifacts = $artifactsJson | ConvertFrom-Json $artifacts = $artifactsJson | ConvertFrom-Json
if ($artifacts.artifacts | Where-Object { $_.name -eq $artifactName }) { if ($artifacts.artifacts | Where-Object { $_.name -eq $artifactName }) {
Write-Host "Artifact '$artifactName' is available." Write-Host "Artifact '$artifactName' is available, continuing..."
break break
} }
Write-Host "Artifact not available yet. Sleeping for $sleepSeconds seconds..." Write-Host "Artifact not available yet. Attempt $($attempt + 1)/$maxAttempts"
Start-Sleep -Seconds $sleepSeconds Start-Sleep -Seconds $sleepSeconds
$attempt++ $attempt++
} }
if ($attempt -ge $maxAttempts) { if ($attempt -ge $maxAttempts) {
Write-Host "Artifact '$artifactName' did not become available in time." Write-Host "Error: Artifact '$artifactName' did not become available in time."
exit 1 exit 1
} }
- name: Download Rust Artifacts - name: Download Rust Artifacts
@@ -204,7 +202,7 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: packages name: packages
path: build/Release/*.nupkg path: build/Release/*nupkg
upload-coverage: upload-coverage:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -13,8 +13,6 @@
<NoWarn>$(NoWarn);NETSDK1188</NoWarn> <NoWarn>$(NoWarn);NETSDK1188</NoWarn>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages> <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap> <PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap>
<Product>Velopack</Product> <Product>Velopack</Product>

View File

@@ -16,6 +16,13 @@
<Product>$(VelopackPackageId)</Product> <Product>$(VelopackPackageId)</Product>
<PackageId>$(VelopackPackageId)</PackageId> <PackageId>$(VelopackPackageId)</PackageId>
<IsPackable>true</IsPackable> <IsPackable>true</IsPackable>
<!-- source link -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup> </PropertyGroup>
<Target Name="AddNugetStaticFiles" BeforeTargets="Build"> <Target Name="AddNugetStaticFiles" BeforeTargets="Build">

View File

@@ -9,7 +9,6 @@
<CheckEolTargetFramework>false</CheckEolTargetFramework> <CheckEolTargetFramework>false</CheckEolTargetFramework>
<LangVersion>9</LangVersion> <LangVersion>9</LangVersion>
<VelopackPackageId>Velopack</VelopackPackageId> <VelopackPackageId>Velopack</VelopackPackageId>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>