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
53 changes: 53 additions & 0 deletions .github/workflows/release-integrity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Application release integrity
on:
pull_request:
paths:
- scripts/verify_release.py
- scripts/tests/**
- .github/workflows/release-integrity.yml
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Application release tag to verify
required: true
type: string
permissions:
contents: read
jobs:
gate-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: python3 -m unittest discover -s scripts/tests -v
verify:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && !startsWith(github.event.release.tag_name, 'examples-'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Download and validate application release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.tag || github.event.release.tag_name }}
run: |
mkdir release-check
gh release download "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --pattern BUILD-MANIFEST.json --pattern '*.zip' --dir release-check
python3 - <<'PY'
import json, os, pathlib, subprocess
root = pathlib.Path('release-check')
m = json.loads((root/'BUILD-MANIFEST.json').read_text())
commit = m['source_commit']
import re
assert re.fullmatch('[0-9a-f]{40}', commit), 'Invalid source commit'
tag_commit = subprocess.check_output(['git','rev-parse',os.environ['RELEASE_TAG']+'^{commit}'], text=True).strip()
assert tag_commit == commit, 'Release tag and source manifest differ'
project = root/'project.pbxproj'
project.write_bytes(subprocess.check_output(['git','show',commit+':DVMetaDataBurnIn.xcodeproj/project.pbxproj']))
subprocess.run(['python3','scripts/verify_release.py','--tag',os.environ['RELEASE_TAG'],
'--manifest',str(root/'BUILD-MANIFEST.json'),'--archive',str(root/pathlib.Path(m['archive']['name']).name),
'--project',str(project)], check=True)
PY
13 changes: 13 additions & 0 deletions DEV.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Development Notes

- Libraries in `Resources/scripts/lib` must be side-effect free; `env.zsh` must be sourced first in the entrypoint.

## Release integrity

Before publishing any new application package, create external and embedded `BUILD-MANIFEST.json` files identifying the exact full source commit, release tag and application version. The external manifest also records the archive name/size/SHA-256, executable hash and bundled-tool hashes; the unchanged Preview 1 manifest is a concrete example. Keep the tag pointing at that source commit. Include all bundled notices, including the DVRescue supplement appended to `Resources/licenses/NOTICE.txt`.

Run against the exact source checkout and final ZIP:

```sh
python3 scripts/verify_release.py --tag v1.0.7-maintenance.2 --manifest /path/to/BUILD-MANIFEST.json --archive /path/to/application.zip --project DVMetaDataBurnIn.xcodeproj/project.pbxproj
python3 -m unittest discover -s scripts/tests -v
```

Use the intended tag and actual paths. This example is not a new release announcement. Never upload after a failed check. The `Application release integrity` workflow repeats validation on newly published application releases, or manually for a specified tag, and compares the tag's source project to the archive. Example-data releases are excluded. Historical packages without manifests are not retrospectively certified. The existing 1.0.4beta ZIP contains version 1.0.3; its tag and bytes are preserved, with actual runtime provenance unknown. Integrity checks do not establish licensing compliance, signing, GUI or player acceptance.
Loading
Loading