Skip to content

Commit

Permalink
update tests to use version instead of tag
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Alvarez <[email protected]>
  • Loading branch information
pendo324 committed Nov 15, 2024
1 parent 3a9e63e commit 28daa2e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-and-test-msi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ jobs:
$tag="${{ needs.get-tag-name.outputs.tag }}"
powershell .\msi-builder\BuildFinchMSI.ps1 -Version $version
$timestamp=[math]::truncate((Get-Date (Get-Date).ToUniversalTime() -UFormat "%s"))
$unsignedMSI="Finch-$tag-$timestamp.msi"
$unsignedMSI="Finch-$version-$timestamp.msi"
Write-Host "Upload unsigned MSI: $unsignedMSI"
aws s3 cp "./msi-builder/build/Finch-$version.msi" "${{ secrets.WINDOWS_UNSIGNED_BUCKET }}$unsignedMSI" --acl bucket-owner-full-control --no-progress
New-Item -Path "./msi-builder/build/signed/" -ItemType Directory -Force
Write-Host "Attemp to download signed MSI"
Write-Host "Attempt to download signed MSI"
$retryCount = 0
$maxRetries = 20
$delay = 5
Expand All @@ -102,7 +102,7 @@ jobs:
$signedMSI = aws s3 ls ${{ secrets.WINDOWS_SIGNED_BUCKET }} 2>&1 | Where-Object { $_ -match "$unsignedMSI" } | Sort-Object -Descending | Select-Object -First 1 | ForEach-Object { ($_ -split '\s+')[-1] }
if ($signedMSI -and ($signedMSI -notlike "*An error occurred (404) when calling the HeadObject operation*")) {
try {
aws s3 cp "${{ secrets.WINDOWS_SIGNED_BUCKET }}$signedMSI" "./msi-builder/build/signed/Finch-$tag.msi"
aws s3 cp "${{ secrets.WINDOWS_SIGNED_BUCKET }}$signedMSI" "./msi-builder/build/signed/Finch-$version.msi"
break
} catch {
Write-Host "Error during copy: $_"
Expand All @@ -124,8 +124,8 @@ jobs:
aws-region: ${{ secrets.REGION }}
- name: upload signed MSI to S3
run: |
$tag="${{ needs.get-tag-name.outputs.tag }}"
aws s3 cp "./msi-builder/build/signed/Finch-$tag.msi" "s3://${{ secrets.INSTALLER_PRIVATE_BUCKET_NAME }}/Finch-$tag.msi" --no-progress
$version="${{ needs.get-tag-name.outputs.version }}"
aws s3 cp "./msi-builder/build/signed/Finch-$version.msi" "s3://${{ secrets.INSTALLER_PRIVATE_BUCKET_NAME }}/Finch-$version.msi" --no-progress
- name: Remove Finch VM and Clean Up Previous Environment
if: ${{ always() }}
timeout-minutes: 2
Expand Down Expand Up @@ -195,8 +195,8 @@ jobs:
}
- name: Download MSI from S3
run: |
$tag="${{ needs.get-tag-name.outputs.tag }}"
aws s3 cp "s3://${{ secrets.INSTALLER_PRIVATE_BUCKET_NAME }}/Finch-$tag.msi" ./Finch.msi
$version="${{ needs.get-tag-name.outputs.version }}"
aws s3 cp "s3://${{ secrets.INSTALLER_PRIVATE_BUCKET_NAME }}/Finch-$version.msi" ./Finch.msi
- name: Install MSI silently
run: |
Start-Process 'Finch.msi' -ArgumentList '/quiet' -Wait
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test-pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
arch: arm64
output_arch: aarch64
version: 14
tag: ${{ needs.get-tag-name.outputs.tag }}
finch_version: ${{ needs.get-tag-name.outputs.version }}

macos-x86-64-pkg-build:
needs: get-tag-name
Expand All @@ -51,7 +51,7 @@ jobs:
arch: amd64
output_arch: x86_64
version: 14
tag: ${{ needs.get-tag-name.outputs.tag }}
finch_version: ${{ needs.get-tag-name.outputs.version }}

macos-aarch64-pkg-test:
strategy:
Expand All @@ -68,7 +68,7 @@ jobs:
arch: arm64
output_arch: aarch64
version: ${{ matrix.version }}
tag: ${{ needs.get-tag-name.outputs.tag }}
finch_version: ${{ needs.get-tag-name.outputs.version }}

macos-x86-64-pkg-test:
strategy:
Expand All @@ -85,4 +85,4 @@ jobs:
arch: amd64
output_arch: x86_64
version: ${{ matrix.version }}
tag: ${{ needs.get-tag-name.outputs.tag }}
finch_version: ${{ needs.get-tag-name.outputs.version }}

0 comments on commit 28daa2e

Please sign in to comment.