You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.7 KiB
100 lines
2.7 KiB
name: Build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*.*"
|
|
|
|
jobs:
|
|
patch:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 5
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@main
|
|
|
|
- name: Run Lint
|
|
run: |
|
|
. "Scripts\Lint.ps1"
|
|
|
|
- name: Download Dependencies
|
|
run: |
|
|
. "Scripts\Dependencies.ps1"
|
|
|
|
- name: Windows 10
|
|
run: |
|
|
. "Scripts\Windows_10.ps1"
|
|
|
|
- name: Windows 10 PowerShell 7
|
|
run: |
|
|
. "Scripts\Windows_10_PS_7.ps1"
|
|
|
|
- name: Windows 10 LTSC 2019
|
|
run: |
|
|
. "Scripts\Windows_10_LTSC_2019.ps1"
|
|
|
|
- name: Windows 10 LTSC 2021
|
|
run: |
|
|
. "Scripts\Windows_10_LTSC_2021.ps1"
|
|
|
|
- name: Windows 11
|
|
run: |
|
|
. "Scripts\Windows_11.ps1"
|
|
|
|
- name: Windows 11 PowerShell 7
|
|
run: |
|
|
. "Scripts\Windows_11_PS_7.ps1"
|
|
|
|
- name: Sophia Script for Windows 11 Arm
|
|
run: |
|
|
. "Scripts\Windows_11_Arm.ps1"
|
|
|
|
- name: Windows 11 Arm PowerShell 7
|
|
run: |
|
|
. "Scripts\Windows_11_Arm_PS_7.ps1"
|
|
|
|
- name: Windows 11 LTSC 2024
|
|
run: |
|
|
. "Scripts\Windows_11_LTSC_2024.ps1"
|
|
|
|
- name: Sophia Script Wrapper
|
|
run: |
|
|
. "Scripts\Wrapper.ps1"
|
|
|
|
- name: Create SFX Archive
|
|
run: |
|
|
. "Scripts\WinGet_SFX.ps1"
|
|
|
|
- name: Defender Scan
|
|
run: |
|
|
# Get Defender path
|
|
$DefenderPath = (Get-ChildItem -Path "$env:ProgramData\Microsoft\Windows Defender\Platform" -Directory | Sort-Object Name -Descending | Select-Object -First 1).FullName
|
|
# Update Defender definitions
|
|
& "$DefenderPath\MpCmdRun.exe" -SignatureUpdate -Verbose
|
|
# Start scan
|
|
# We need to use absolute path
|
|
& "$DefenderPath\MpCmdRun.exe" -Scan -ScanType 3 -DisableRemediation -File $((Get-Item -Path Sophia_Script).FullName) | ForEach-Object {Write-Verbose -Message $_ -Verbose}
|
|
|
|
Get-Content -Path $env:TEMP\MpCmdRun.log
|
|
|
|
- name: Release Notes Template
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# Set $env:GITHUB_REF_NAME variable to use in ps1 file instead of ${{ github.ref_name }}
|
|
GITHUB_REF_NAME: ${{ github.ref_name }}
|
|
id: read_release
|
|
run: |
|
|
. "Scripts\ReleaseNotesTemplate.ps1"
|
|
|
|
- name: Uploading
|
|
uses: softprops/action-gh-release@master
|
|
with:
|
|
name: ${{ steps.read_release.outputs.RELEASE_NAME }}
|
|
token: ${{ github.token }}
|
|
# Use "/" in path to files
|
|
files: |
|
|
Sophia_Script/Sophia*.zip
|
|
Sophia_Script/Sophia*.exe
|
|
body_path: ${{ steps.read_release.outputs.ReleaseBody }}
|
|
|