Fix repair #1693
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build XIVLauncher | |
on: [push, pull_request] | |
concurrency: build_xl | |
jobs: | |
build-release: | |
name: Build Release on Windows | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: windows-2022 | |
steps: | |
# - uses: nadock/verified_commits_check@f9b330e987c2e7121dfc0230e65cb5751ee5fac9 | |
- uses: actions/checkout@v1 | |
- name: Initialize Submodules | |
run: git submodule update --init --recursive | |
- name: Restore Nuget Packages | |
run: | | |
cd .\src\ | |
dotnet restore | |
cd .. | |
- name: Define VERSION | |
run: | | |
$env:COMMIT = $env:GITHUB_SHA.Substring(0, 7) | |
$env:REPO_NAME = $env:GITHUB_REPOSITORY -replace '.*/' | |
$env:BRANCH = $env:GITHUB_REF -replace '.*/' | |
($env:REPO_NAME) >> VERSION | |
($env:BRANCH) >> VERSION | |
($env:COMMIT) >> VERSION | |
- name: Build DotNet4 for Release | |
run: | | |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\" | |
.\MSBuild.exe $Env:GITHUB_WORKSPACE\src\XIVLauncher.sln /t:Build /p:Configuration=Release | |
- name: Build Squirrel Release | |
id: build-squirrel | |
run: | | |
cd src\ | |
$releases = Invoke-WebRequest -Uri 'https://api.github.com/repos/goatcorp/FFXIVQuickLauncher/releases' | |
$current = ConvertFrom-Json -InputObject $releases.Content | Select-Object -First 1 | |
$refver = $env:GITHUB_REF -replace '.*/' | |
echo "::set-output name=version::$refver" | |
nuget pack .\XIVLauncher.nuspec -properties version=$refver | |
mkdir Releases | |
cp .\XIVLauncher\Resources\CHANGELOG.txt .\Releases\ | |
$release_file = $current.assets | Where-Object -Property name -Value RELEASES -EQ | |
Invoke-WebRequest -Uri $release_file.browser_download_url -OutFile .\Releases\RELEASES | |
$delta_file = $current.assets | Where-Object -Property name -Value "*delta.nupkg" -Like | |
Invoke-WebRequest -Uri $delta_file.browser_download_url -OutFile ".\Releases\$($delta_file.name)" | |
$full_file = $current.assets | Where-Object -Property name -Value "*full.nupkg" -Like | |
Invoke-WebRequest -Uri $full_file.browser_download_url -OutFile ".\Releases\$($full_file.name)" | |
$setup_file = $current.assets | Where-Object -Property name -Value "Setup.exe" -EQ | |
Invoke-WebRequest -Uri $setup_file.browser_download_url -OutFile .\Releases\Setup.exe | |
~\.nuget\packages\squirrel.windows\1.9.1\tools\Squirrel.exe --no-msi --releasify .\XIVLauncher.$refver.nupkg --setupIcon=.\XIVLauncher\Resources\dalamud_icon.ico --icon=.\XIVLauncher\Resources\dalamud_icon.ico | |
Start-Sleep -s 60 | |
rm ".\Releases\$($delta_file.name)" | |
rm ".\Releases\$($full_file.name)" | |
- name: Create Release | |
uses: softprops/action-gh-release@91409e712cf565ce9eff10c87a8d1b11b81757ae | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: src\Releases\** | |
name: Release ${{ steps.build-squirrel.outputs.version }} | |
body_path: RELEASE.md | |
prerelease: true | |
- name: VirusTotal Scan | |
uses: crazy-max/ghaction-virustotal@a3f74cfd584b0658320aec5e94ab6a8d16dca05f | |
with: | |
vt_api_key: ${{ secrets.VT_API_KEY }} | |
files: ./src/Releases/*.exe | |
build: | |
name: Build on Windows | |
runs-on: windows-2022 | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Initialize Submodules | |
run: git submodule update --init --recursive | |
- name: Restore Nuget Packages | |
run: | | |
cd .\src\ | |
dotnet restore | |
cd .. | |
- name: Define VERSION | |
run: | | |
$env:COMMIT = $env:GITHUB_SHA.Substring(0, 7) | |
$env:REPO_NAME = $env:GITHUB_REPOSITORY -replace '.*/' | |
$env:BRANCH = $env:GITHUB_REF -replace '.*/' | |
($env:REPO_NAME) >> VERSION | |
($env:BRANCH) >> VERSION | |
($env:COMMIT) >> VERSION | |
- name: Build DotNet4 Master | |
run: | | |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\" | |
.\MSBuild.exe $Env:GITHUB_WORKSPACE\src\XIVLauncher.sln /t:Build /p:Configuration=ReleaseNoUpdate | |
- name: Upload artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: xivlauncher-artifact | |
path: src\bin\ |