Skip to content

armgit / WacOS

Public Imported from GitHub
0

A new style desktop shell for Windows 11: menu bar, Dock, Finder, Spotlight, Control Center and Liquid Glass, in native C++.

Rust

Publish releases from the author's PC with the full package

Eternity070628cd7b6947424a
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 82a7007..9aacd0b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,7 +1,6 @@
-# On every commit to main: build WacOS (build.cmd plus the 32/64-bit title bar DLLs), write the version to
-# bin\versao.txt and publish the update package as the "latest" GitHub release. The "Update Now" button in
-# System Settings (tools\atualizar-github.ps1) compares that version with the installed one and downloads it
-# only when there is something new.
+# On every commit to main: checks that WacOS builds (build.cmd plus the 32/64-bit title bar DLLs).
+# Releases are published from the author's PC with tools\publicar.ps1: the full package carries the SF fonts,
+# macOS sounds and cursor, which are not in this repository.
name: build
on:
@@ -9,54 +8,14 @@ on:
branches: [main]
workflow_dispatch:
-permissions:
- contents: write
-
-concurrency:
- group: build
- cancel-in-progress: false
-
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- - name: Version
- id: version
- shell: pwsh
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- # sequential: one more than the releases that exist (they were reset to build-1 on 2026-11-17)
- $n = @(gh release list --limit 1000 --json tagName --jq '.[].tagName' | Where-Object { $_ -match '^build-\d+$' }).Count + 1
- $tag = "build-$n"
- New-Item -ItemType Directory -Force bin | Out-Null
- Set-Content -Encoding utf8 bin\versao.txt @($tag, "${{ github.sha }}", (Get-Date -Format 'yyyy-MM-dd HH:mm'))
- "tag=$tag" >> $env:GITHUB_OUTPUT
- name: Build
shell: cmd
run: |
call build.cmd || exit /b 1
call build.cmd janelas || exit /b 1
-
- - name: Package
- shell: pwsh
- run: |
- New-Item -ItemType Directory -Force dist | Out-Null
- powershell -NoProfile -ExecutionPolicy Bypass -File tools\empacotar.ps1 -SemSistema -Atualizacao -Zip "$PWD\dist\WacOS.zip"
- if (-not (Test-Path dist\WacOS.zip)) { throw 'the package was not created' }
-
- - name: Publish
- shell: pwsh
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- $tag = "${{ steps.version.outputs.tag }}"
- $prev = git describe --tags --abbrev=0 HEAD~1 2>$null
- $notes = if ($prev) { git log --pretty=format:'- %s' "$prev..HEAD" } else { git log -20 --pretty=format:'- %s' }
- Set-Content -Encoding utf8 notes.md $notes
- gh release create $tag dist\WacOS.zip --title "WacOS $tag" --notes-file notes.md --latest
diff --git a/tools/publicar.ps1 b/tools/publicar.ps1
new file mode 100644
index 0000000..6da3502
--- /dev/null
+++ b/tools/publicar.ps1
@@ -0,0 +1,37 @@
+# Publishes a new WacOS version on GitHub with the FULL package (programs, icons, SF fonts, macOS sounds and
+# cursor), built on this PC: the fonts, sounds and cursor are not in the repository, so GitHub Actions can't build
+# this package (it only checks that the code compiles).
+# 1. next version = build-<number of build-N releases + 1>
+# 2. writes bin\versao.txt (version, commit, date): the updater compares it with the latest release
+# 3. tools\empacotar.ps1 -SemSistema -SemAjustes (no personal settings) -> dist\WacOS-<date>.zip
+# 4. git push, then a release with that zip as the latest
+# Run it from a normal PowerShell of the user (it reads the installed fonts and the cursor in use).
+param([string]$Notas = '')
+$ErrorActionPreference = 'Stop'
+$root = Split-Path $PSScriptRoot -Parent
+Set-Location $root
+$repo = 'renzyxx/WacOS'
+$log = Join-Path $root 'dist\publicar.log'
+function L($s) { $s | Tee-Object -FilePath $log -Append | Write-Host }
+New-Item -ItemType Directory -Force (Join-Path $root 'dist') | Out-Null
+"" | Set-Content $log
+
+$n = @(gh release list -R $repo --limit 1000 --json tagName --jq '.[].tagName' | Where-Object { $_ -match '^build-\d+$' }).Count + 1
+$tag = "build-$n"
+git push -q origin main 2>&1 | Out-Null
+$sha = (git rev-parse HEAD).Trim()
+L "versão: $tag ($sha)"
+Set-Content -Encoding utf8 (Join-Path $root 'bin\versao.txt') @($tag, $sha, (Get-Date -Format 'yyyy-MM-dd HH:mm'))
+
+& powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot 'empacotar.ps1') -SemSistema -SemAjustes *>&1 | ForEach-Object { L "$_" }
+$zip = Get-ChildItem (Join-Path $root 'dist') -Filter 'WacOS-*.zip' | Sort-Object LastWriteTime -Descending | Select-Object -First 1
+if (-not $zip) { L 'ERRO: o pacote não foi gerado'; exit 1 }
+
+if (-not $Notas) {
+ $antes = gh release list -R $repo --limit 1 --json tagName --jq '.[0].tagName'
+ $Notas = if ($antes) { (git log --pretty=format:'- %s' "$antes..HEAD") -join "`n" } else { '- New version' }
+}
+$nf = Join-Path $root 'dist\notas.md'
+Set-Content -Encoding utf8 $nf $Notas
+gh release create $tag $zip.FullName -R $repo --target $sha --title "WacOS $tag" --notes-file $nf --latest 2>&1 | ForEach-Object { L "$_" }
+L "publicado: $tag ($([math]::Round($zip.Length / 1MB)) MB)"