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.
95 lines
2.8 KiB
95 lines
2.8 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
|
|
|
|
with:
|
|
ref: refs/heads/master
|
|
fetch-depth: 0
|
|
|
|
- name: Dependencies
|
|
run: |
|
|
. "Scripts\Dependencies.ps1"
|
|
|
|
- name: Sophia Script for Windows 10
|
|
run: |
|
|
. "Scripts\Windows_10.ps1"
|
|
|
|
- name: Sophia Script for Windows 10 PowerShell 7
|
|
run: |
|
|
. "Scripts\Windows_10_PS_7.ps1"
|
|
|
|
- name: Sophia Script for Windows 10 LTSC 2019
|
|
run: |
|
|
. "Scripts\Windows_10_LTSC_2019.ps1"
|
|
|
|
- name: Sophia Script for Windows 10 LTSC 2021
|
|
run: |
|
|
. "Scripts\Windows_10_LTSC_2021.ps1"
|
|
|
|
- name: Sophia Script for Windows 11
|
|
run: |
|
|
. "Scripts\Windows_11.ps1"
|
|
|
|
- name: Sophia Script for Windows 11 PowerShell 7
|
|
run: |
|
|
. "Scripts\Windows_11_PS_7.ps1"
|
|
|
|
- name: Sophia Script for Windows 11 LTSC 2024
|
|
run: |
|
|
. "Scripts\Windows_11_LTSC_2024.ps1"
|
|
|
|
- name: Sophia Script Wrapper
|
|
run: |
|
|
. "Scripts\Wrapper.ps1"
|
|
|
|
- name: ReleaseNotesTemplate
|
|
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: Adding SHA256SUM.json
|
|
run: |
|
|
$JSON = @{}
|
|
Get-ChildItem -Path . -File | Where-Object -FilterScript {$_.Name -match "zip|exe"} | ForEach-Object -Process {
|
|
Write-Verbose -Message "$($_.Name) has $((Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256).Hash) hashsum" -Verbose
|
|
|
|
$JSON += @{
|
|
"$($_.Name)" = "$((Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256).Hash)"
|
|
}
|
|
}
|
|
$JSON | ConvertTo-Json | Set-Content -Path SHA256SUM.json -Encoding utf8 -Force
|
|
|
|
git config --global user.name "GitHub Actions"
|
|
git config --global user.email "actions@github.com"
|
|
git add SHA256SUM.json
|
|
git commit -m "Update from ${{ github.ref_name }} for adding SHA256SUM.json"
|
|
# repository and branch to push to
|
|
git push origin HEAD:refs/heads/master
|
|
|
|
- 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*.zip
|
|
chocolatey/tools/chocolateyinstall.ps1
|
|
body_path: ${{ steps.read_release.outputs.ReleaseBody }}
|
|
|