Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mx2rel authored Mar 13, 2024
1 parent 2a964d9 commit 410b721
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

# Replace URL in code
- name: Replace URL in code
run: |
Get-ChildItem -Path VulcanForWindows/Classes/VulcanGradesDb -Recurse -Include *.cs | ForEach-Object {
(Get-Content $_.FullName) | ForEach-Object {
$_ -replace 'Properties.Resources.ClassmatesGradesServerUrl', '${{ secrets.CLASSMATES_GRADES_SERVER_URL }}'
} | Set-Content $_.FullName
}
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v1
Expand All @@ -53,11 +61,6 @@ jobs:
$certificatePath = "GitHubActionsWorkflow.pfx"
[IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
# Replace URL in code
- name: Replace URL in code
run: |
find VulcanForWindows/Classes/VulcanGradesDb -type f -name '*.cs' -exec sed -i "s|Properties.Resources.ClassmatesGradesServerUrl|${{ secrets.CLASSMATES_GRADES_SERVER_URL }}|g" {} +
# Create the app package by building and packaging the project
- name: Create the app package
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration /p:Platform=$env:Platform /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:AppxPackageDir="$env:Appx_Package_Dir" /p:GenerateAppxPackageOnBuild=true
Expand Down

0 comments on commit 410b721

Please sign in to comment.