Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
pull_request:
push:
branches: [main]
branches: [main, "release/**"]
merge_group:
workflow_dispatch:

Expand Down Expand Up @@ -31,6 +31,14 @@ jobs:
if ($LASTEXITCODE -ne 0) { throw "tests failed" }
# In the format of release/<version>.SHA256SUMS.txt.
Get-ChildItem build\Release\*.dll | Sort-Object Name | ForEach-Object { '{0} {1}' -f (Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLowerInvariant(), $_.Name }
- name: Upload the Windows libraries
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: windows-libs
path: |
build/Release/modavd_extras.dll
build/Release/external_renderer_ipc.dll
if-no-files-found: error

posix:
strategy:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@ jobs:
SHA: ${{ github.sha }}
run: |
if ($env:TAG -cnotmatch '^v[0-9]+\.[0-9]+\.[0-9]+$') { throw "invalid tag: $env:TAG" }
# Full ref name: a tag called origin/main would win over the remote branch.
# Full ref names: a tag called origin/main would win over the remote branch.
# On main, or on any release/* branch.
git merge-base --is-ancestor $env:SHA refs/remotes/origin/main
if ($LASTEXITCODE -ne 0) { throw 'tag is not on origin/main' }
$onBranch = ($LASTEXITCODE -eq 0)
if (-not $onBranch) {
foreach ($ref in @(git for-each-ref --format='%(refname)' refs/remotes/origin/release/)) {
git merge-base --is-ancestor $env:SHA $ref
if ($LASTEXITCODE -eq 0) { $onBranch = $true; break }
}
}
if (-not $onBranch) { throw 'tag is not on origin/main or any origin/release/* branch' }
$version = $env:TAG.Substring(1)
$found = @(Select-String -LiteralPath CMakeLists.txt -CaseSensitive -Pattern '^project\(ModAVDExtras VERSION ([0-9]+\.[0-9]+\.[0-9]+)')
if ($found.Count -ne 1) { throw "expected one project(ModAVDExtras VERSION ...) line in CMakeLists.txt, found $($found.Count)" }
Expand Down
Loading