Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/scripts/Configure-AppxManifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,15 @@ elseif ($Branch -eq "Store")
}
}

# Replace the placeholders with the actual values
Get-ChildItem $WorkingDir -Include *.cs -recurse | ForEach-Object -Process `
{ `
(Get-Content $_ -Raw | ForEach-Object -Process { $_ -replace "bingmapskey.secret", "$SecretBingMapsKey" }) | `
Set-Content $_ -NoNewline `
}

Get-ChildItem $WorkingDir -Include *.cs -recurse | ForEach-Object -Process `
{
(Get-Content $_ -Raw | ForEach-Object -Process { $_ -replace "sentry.secret", "$SecretSentry" }) | `
Set-Content $_ -NoNewline `
}

Get-ChildItem $WorkingDir -Include *.cs -recurse | ForEach-Object -Process `
{ `
(Get-Content $_ -Raw | ForEach-Object -Process { $_ -replace "githubclientid.secret", "$SecretGitHubOAuthClientId" }) | `
Set-Content $_ -NoNewline `
}
28 changes: 6 additions & 22 deletions .github/workflows/cd-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ jobs:
WORKING_DIR: '${{ github.workspace }}' # D:\a\Files\Files\
ARTIFACTS_STAGING_DIR: '${{ github.workspace }}\artifacts'
APPX_PACKAGE_DIR: '${{ github.workspace }}\artifacts\AppxPackages'
PACKAGE_PROJECT_DIR: 'src\Files.App (Package)'
PACKAGE_PROJECT_PATH: 'src\Files.App (Package)\Files.Package.wapproj'
PACKAGE_MANIFEST_PATH: 'src\Files.App (Package)\Package.appxmanifest'
TEST_PROJECT_PATH: 'tests\Files.InteractionTests\Files.InteractionTests.csproj'
PACKAGE_PROJECT_PATH: '${{ github.workspace }}\src\Files.App (Package)\Files.Package.wapproj'
PACKAGE_MANIFEST_PATH: '${{ github.workspace }}\src\Files.App (Package)\Package.appxmanifest'
APP_INSTALLER_SIDELOAD_URL: 'https://cdn.files.community/files/preview/'

steps:
Expand All @@ -52,7 +50,6 @@ jobs:
global-json-file: global.json

- name: Configure the package manifest, logo, and secrets
shell: pwsh
run: |
. './.github/scripts/Configure-AppxManifest.ps1' `
-Branch "$env:CONFIGURATION" `
Expand All @@ -68,17 +65,10 @@ jobs:
SECRET_SENTRY: ${{ secrets.SENTRY_SECRET }}
SECRET_GITHUB_OAUTH_CLIENT_ID: ${{ secrets.GH_OAUTH_CLIENT_ID }}

- name: Use Windows SDK Preview
shell: cmd
run: |
for /f %%a in ('dir /b /a:d %localappdata%\Microsoft\VisualStudio\17*') do echo UsePreviews=True>%localappdata%\Microsoft\VisualStudio\%%a\sdk.txt

- name: Restore NuGet
shell: pwsh
run: 'nuget restore $env:SOLUTION_NAME'

- name: Restore Files
shell: pwsh
run: |
msbuild $env:SOLUTION_NAME `
-t:Restore `
Expand All @@ -87,7 +77,6 @@ jobs:
-p:PublishReadyToRun=true

- name: Build & package Files
shell: pwsh
run: |
msbuild "$env:PACKAGE_PROJECT_PATH" `
-t:Build `
Expand Down Expand Up @@ -135,15 +124,10 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Upload to Azure blob storage
uses: azure/powershell@v2
with:
inlineScript: |
az storage blob upload-batch --account-name "filescommunity" --destination "files" --destination-path "preview" --source ${{ env.APPX_PACKAGE_DIR }} --overwrite true
azPSVersion: "latest"

- name: Logout from Azure
run: 'az logout'
- name: Upload to Azure blob storage & logout from Azure
run: |
az storage blob upload-batch --account-name "filescommunity" --destination "files" --destination-path "preview" --source ${{ env.APPX_PACKAGE_DIR }} --overwrite true
az logout'

- name: Upload the packages to GitHub Actions
uses: actions/upload-artifact@v4
Expand Down
28 changes: 7 additions & 21 deletions .github/workflows/cd-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ jobs:
WORKING_DIR: '${{ github.workspace }}' # D:\a\Files\Files\
ARTIFACTS_STAGING_DIR: '${{ github.workspace }}\artifacts'
APPX_PACKAGE_DIR: '${{ github.workspace }}\artifacts\AppxPackages'
PACKAGE_PROJECT_DIR: 'src\Files.App (Package)'
PACKAGE_PROJECT_PATH: 'src\Files.App (Package)\Files.Package.wapproj'
PACKAGE_MANIFEST_PATH: 'src\Files.App (Package)\Package.appxmanifest'
TEST_PROJECT_PATH: 'tests\Files.InteractionTests\Files.InteractionTests.csproj'
PACKAGE_PROJECT_DIR: '${{ github.workspace }}\src\Files.App (Package)'
PACKAGE_PROJECT_PATH: '${{ github.workspace }}\src\Files.App (Package)\Files.Package.wapproj'
PACKAGE_MANIFEST_PATH: '${{ github.workspace }}\src\Files.App (Package)\Package.appxmanifest'
APP_INSTALLER_SIDELOAD_URL: 'https://cdn.files.community/files/stable/'

steps:
Expand Down Expand Up @@ -68,17 +67,10 @@ jobs:
SECRET_SENTRY: ${{ secrets.SENTRY_SECRET }}
SECRET_GITHUB_OAUTH_CLIENT_ID: ${{ secrets.GH_OAUTH_CLIENT_ID }}

- name: Use Windows SDK Preview
shell: cmd
run: |
for /f %%a in ('dir /b /a:d %localappdata%\Microsoft\VisualStudio\17*') do echo UsePreviews=True>%localappdata%\Microsoft\VisualStudio\%%a\sdk.txt

- name: Restore NuGet
shell: pwsh
run: 'nuget restore $env:SOLUTION_NAME'

- name: Restore Files
shell: pwsh
run: |
msbuild $env:SOLUTION_NAME `
-t:Restore `
Expand All @@ -87,7 +79,6 @@ jobs:
-p:PublishReadyToRun=true

- name: Build & package Files
shell: pwsh
run: |
msbuild "$env:PACKAGE_PROJECT_PATH" `
-t:Build `
Expand Down Expand Up @@ -135,15 +126,10 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Upload to Azure blob storage
uses: azure/powershell@v2
with:
inlineScript: |
az storage blob upload-batch --account-name "filescommunity" --destination "files" --destination-path "stable" --source ${{ env.APPX_PACKAGE_DIR }} --overwrite true
azPSVersion: "latest"

- name: Logout from Azure
run: 'az logout'
- name: Upload to Azure blob storage & logout from Azure
run: |
az storage blob upload-batch --account-name "filescommunity" --destination "files" --destination-path "stable" --source ${{ env.APPX_PACKAGE_DIR }} --overwrite true
az logout

- name: Upload the packages to GitHub Actions
uses: actions/upload-artifact@v4
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/cd-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,10 @@ jobs:
SECRET_SENTRY: ${{ secrets.SENTRY_SECRET }}
SECRET_GITHUB_OAUTH_CLIENT_ID: ${{ secrets.GH_OAUTH_CLIENT_ID }}

- name: Use Windows SDK Preview
shell: cmd
run: |
for /f %%a in ('dir /b /a:d %localappdata%\Microsoft\VisualStudio\17*') do echo UsePreviews=True>%localappdata%\Microsoft\VisualStudio\%%a\sdk.txt

- name: Restore NuGet
shell: pwsh
run: 'nuget restore $env:SOLUTION_NAME'

- name: Restore Files
shell: pwsh
run: |
msbuild $env:SOLUTION_NAME `
-t:Restore `
Expand All @@ -84,7 +77,6 @@ jobs:
-p:PublishReadyToRun=true

- name: Build & package Files
shell: pwsh
run: |
msbuild "$env:PACKAGE_PROJECT_PATH" `
-t:Build `
Expand Down
28 changes: 12 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ run-name: ${{ github.event_name == 'pull_request' && 'Files PR Validation' || 'F

env:
WORKING_DIR: ${{ github.workspace }} # Default: 'D:\a\Files\Files'
SOLUTION_PATH: '${{ github.workspace }}\Files.sln'
PACKAGE_PROJECT_DIR: '${{ github.workspace }}\src\Files.App (Package)'
PACKAGE_PROJECT_PATH: '${{ github.workspace }}\src\Files.App (Package)\Files.Package.wapproj'
AUTOMATED_TESTS_ARCHITECTURE: 'x64'
SOLUTION_PATH: '${{ github.workspace }}\Files.sln'
PACKAGE_PROJECT_DIR: '${{ github.workspace }}\src\Files.App (Package)'
PACKAGE_PROJECT_PATH: '${{ github.workspace }}\src\Files.App (Package)\Files.Package.wapproj'
AUTOMATED_TESTS_ARCHITECTURE: 'x64'
AUTOMATED_TESTS_CONFIGURATION: 'Release'
AUTOMATED_TESTS_PROJECT_DIR: '${{ github.workspace }}\tests\Files.InteractionTests'
AUTOMATED_TESTS_PROJECT_PATH: '${{ github.workspace }}\tests\Files.InteractionTests\Files.InteractionTests.csproj'
AUTOMATED_TESTS_ASSEMBLY_DIR: '${{ github.workspace }}\artifacts\TestsAssembly'
ARTIFACTS_STAGING_DIR: '${{ github.workspace }}\artifacts'
APPX_PACKAGE_DIR: '${{ github.workspace }}\artifacts\AppxPackages'
APPX_SELFSIGNED_CERT_PATH: '${{ github.workspace }}\.github\workflows\FilesApp_SelfSigned.pfx'
WINAPPDRIVER_EXE86_PATH: 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe'
WINAPPDRIVER_EXE64_PATH: 'C:\Program Files\Windows Application Driver\WinAppDriver.exe'
AUTOMATED_TESTS_PROJECT_DIR: '${{ github.workspace }}\tests\Files.InteractionTests'
AUTOMATED_TESTS_PROJECT_PATH: '${{ github.workspace }}\tests\Files.InteractionTests\Files.InteractionTests.csproj'
AUTOMATED_TESTS_ASSEMBLY_DIR: '${{ github.workspace }}\artifacts\TestsAssembly'
ARTIFACTS_STAGING_DIR: '${{ github.workspace }}\artifacts'
APPX_PACKAGE_DIR: '${{ github.workspace }}\artifacts\AppxPackages'
APPX_SELFSIGNED_CERT_PATH: '${{ github.workspace }}\.github\workflows\FilesApp_SelfSigned.pfx'
WINAPPDRIVER_EXE86_PATH: 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe'
WINAPPDRIVER_EXE64_PATH: 'C:\Program Files\Windows Application Driver\WinAppDriver.exe'

jobs:

Expand Down Expand Up @@ -109,11 +109,9 @@ jobs:
global-json-file: global.json

- name: Restore NuGet
shell: pwsh
run: 'nuget restore $env:SOLUTION_PATH'

- name: Restore Files
shell: pwsh
run: |
msbuild $env:SOLUTION_PATH `
-t:Restore `
Expand Down Expand Up @@ -166,7 +164,6 @@ jobs:

- if: env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE && env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION
name: Copy tests bin to the artifacts dir
shell: pwsh
run: |
Copy-Item `
-Path "$env:AUTOMATED_TESTS_PROJECT_DIR\bin" `
Expand Down Expand Up @@ -228,7 +225,6 @@ jobs:
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force

- name: Start WinAppDriver process
shell: pwsh
run: Start-Process -FilePath "$env:WINAPPDRIVER_EXE86_PATH"

# Retry integration tests if first attempt fails
Expand Down