84 lines
No EOL
4.1 KiB
YAML
84 lines
No EOL
4.1 KiB
YAML
name: LANCommander Launcher Linux arm64
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
steps:
|
|
- uses: frabert/replace-string-action@v2
|
|
name: Trim Tag Ref
|
|
id: trim_tag_ref
|
|
with:
|
|
string: '${{ github.ref }}'
|
|
pattern: 'refs/tags/v'
|
|
replace-with: ''
|
|
|
|
- uses: frabert/replace-string-action@v2
|
|
name: Swap Path Backslashes
|
|
id: swap_path_backslashes
|
|
with:
|
|
string: '${{ github.workspace }}'
|
|
pattern: '\\'
|
|
replace-with: '/'
|
|
flags: g
|
|
|
|
# dotnet
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: 8.0.x
|
|
- name: Restore dependencies
|
|
run: dotnet restore
|
|
|
|
# Auto Updater
|
|
- name: Publish Updater
|
|
run: dotnet publish "./LANCommander.AutoUpdater/LANCommander.AutoUpdater.csproj" -c Release --self-contained --runtime linux-arm64 -p:Version="${{ steps.trim_tag_ref.outputs.replaced }}" -p:AssemblyVersion="${{ steps.trim_tag_ref.outputs.replaced }}"
|
|
- name: Rename Updater
|
|
run: mv ./LANCommander.AutoUpdater/bin/Release/net8.0/linux-arm64/publish/LANCommander.AutoUpdater ./LANCommander.AutoUpdater/bin/Release/net8.0/linux-arm64/publish/LANCommander.AutoUpdater.Update
|
|
|
|
# Launcher
|
|
- run: cd LANCommander.Launcher; npm install
|
|
|
|
- name: Publish Launcher
|
|
run: dotnet publish "./LANCommander.Launcher/LANCommander.Launcher.csproj" -c Release --self-contained --runtime linux-arm64 -p:Version="${{ steps.trim_tag_ref.outputs.replaced }}" -p:AssemblyVersion="${{ steps.trim_tag_ref.outputs.replaced }}"
|
|
|
|
- name: Remove Extra Files
|
|
run: |
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/wwwroot/_content/BootstrapBlazor.PdfReader/compat
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/wwwroot/_content/BootstrapBlazor.PdfReader/2.*
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/wwwroot/_content/BootstrapBlazor.PdfReader/build/pdf.sandbox.js
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/wwwroot/_content/BootstrapBlazor.PdfReader/build/*.map
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/wwwroot/_content/BootstrapBlazor.PdfReader/web/*.map
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/wwwroot/_content/AntDesign/less
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/LANCommander.ico
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/LANCommanderDark.ico
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/package-lock.json
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/package.json
|
|
rm -Recurse -Force -ErrorAction Ignore ./LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/*.pdb
|
|
|
|
# Create ZIP file
|
|
- name: Package Launcher Build
|
|
uses: vimtor/action-zip@v1.2
|
|
with:
|
|
files: LANCommander.Launcher/bin/Release/net8.0/linux-arm64/publish/ LANCommander.AutoUpdater/bin/Release/net8.0/linux-arm64/publish/ LANCommander.PowerShell/Build/LANCommander.PowerShell.dll LANCommander.PowerShell/Build/LANCommander.PowerShell.psd1
|
|
recursive: true
|
|
dest: LANCommander.Launcher-Linux-arm64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: LANCommander.Launcher-Linux-arm64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
|
|
name: LANCommander.Launcher-Linux-arm64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip |