Fix JOC detection inside mp4/mkv containers
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
name: build
|
||||
|
||||
# Builds both architectures and publishes the two installable component packages.
|
||||
# Builds both architectures, publishes the two installable component packages as
|
||||
# workflow artifacts, and — when a tag is pushed — turns them into a GitHub release.
|
||||
# The SDK is fetched from foobar2000.org at build time (tools/setup_sdk.ps1) and the
|
||||
# renderer sources are part of this repository (kernel/), so nothing else is needed.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
tags: [ 'v*' ]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -20,6 +22,16 @@ jobs:
|
||||
shell: pwsh
|
||||
run: ./tools/setup_sdk.ps1 -TargetVersion 80
|
||||
|
||||
- name: Check the tag against the component version
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
shell: pwsh
|
||||
run: |
|
||||
$declared = (Select-String -Path src/main.cpp -Pattern '#define JOC_VERSION "([^"]+)"').Matches[0].Groups[1].Value
|
||||
$tag = '${{ github.ref_name }}'
|
||||
if ($tag -ne "v$declared") {
|
||||
throw "the tag $tag does not match JOC_VERSION $declared; the release would be mislabelled"
|
||||
}
|
||||
|
||||
- name: Build both architectures and package them
|
||||
shell: pwsh
|
||||
run: ./tools/package.ps1
|
||||
@@ -41,3 +53,28 @@ jobs:
|
||||
name: foo_input_joc-x64
|
||||
path: dist/*-x64.fb2k-component
|
||||
if-no-files-found: error
|
||||
|
||||
release:
|
||||
# A pushed tag is what makes a release; branch builds only leave artifacts.
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: windows
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Collect the packaged components
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- name: List what will be published
|
||||
run: ls -l dist
|
||||
|
||||
- name: Create the release for this tag
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: ${{ github.ref_name }}
|
||||
files: dist/*.fb2k-component
|
||||
fail_on_unmatched_files: true
|
||||
generate_release_notes: true
|
||||
|
||||
Reference in New Issue
Block a user