Update bugreport.yml to include sub check #1788
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 | |
permissions: | |
id-token: write | |
contents: write # Must be 'write' to create a release | |
attestations: write | |
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: Attest Artifacts | |
if: ${{ github.repository_owner == 'goatcorp' && github.event_name == 'push' }} | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: | | |
src/bin/XIVLauncher.exe | |
src/bin/XIVLauncher.*.dll | |
src/bin/XIVLauncher.*.exe | |
- 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: Attest Setup | |
if: ${{ github.repository_owner == 'goatcorp' && github.event_name == 'push' }} | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: | | |
src/Releases/*.exe | |
src/Releases/*.nupkg | |
src/Releases/RELEASES | |
- name: Create Release | |
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 | |
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/')" | |
permissions: | |
id-token: write | |
contents: read | |
attestations: write | |
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: Attest Artifacts | |
if: ${{ github.repository_owner == 'goatcorp' && github.event_name == 'push' }} | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: | | |
src/bin/XIVLauncher.exe | |
src/bin/XIVLauncher.*.dll | |
src/bin/XIVLauncher.*.exe | |
- name: Upload artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: xivlauncher-artifact | |
path: src\bin\ |