# The Windows and macOS packages bundle GStreamer and its plugins, FFmpeg, libsoup # and the image parsers GTK uses for artwork, from MSYS2 and Homebrew: neither gets # a distribution's security updates (docs/release-component-policy.md). Daily, # compare what MSYS2 and Homebrew offer with build-aux/packaging/bundled-versions.txt # (recorded at the last release) and keep one issue open listing what moved, so the # packages get rebuilt and released. scripts/bundled-versions.py --write records the # new versions once they ship. Daily: a security fix upstream reaches Homebrew and # MSYS2 within days, and a release can follow the same day. name: Bundled libraries on: schedule: - cron: "37 6 * * *" workflow_dispatch: permissions: contents: read jobs: check: name: Check for updates runs-on: ubuntu-24.04 permissions: contents: read issues: write steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Compare with the last release, and open or update the issue env: GH_TOKEN: ${{ github.token }} REPOSITORY: ${{ github.repository }} run: | set -uo pipefail title="Bundled libraries changed: rebuild the Windows and macOS packages" # The step's shell runs with -e: take the status in an OR-list. status=0 python3 scripts/bundled-versions.py --check > report.md || status=$? cat report.md # 0: no changes; 3: changes; anything else (2: a source couldn't be # queried, 1: the script failed) fails the job and leaves the issue alone. number=$(gh issue list --repo "$REPOSITORY" --state open --search "in:title \"$title\"" \ --json number,title --jq "map(select(.title == \"$title\")) | .[0].number // empty") case $status in 0) # Nothing moved since the recorded versions: a report from before the # last release is done with. if [ -n "$number" ]; then gh issue close "$number" --repo "$REPOSITORY" \ --comment "No changes remain since the versions recorded at the last release (run ${GITHUB_RUN_ID})." fi exit 0 ;; 3) ;; *) echo "bundled-versions.py exited $status; no issue updated" >&2; exit 1 ;; esac { echo "Libraries in Tributary's Windows and macOS bundles changed since the last release." echo "When a change fixes a security problem (check the package's changelog or advisory)," echo "rebuild and release, then record the new versions with" echo '`scripts/bundled-versions.py --write` (docs/release-component-policy.md).' echo cat report.md echo echo "_Updated by the Bundled libraries workflow, run ${GITHUB_RUN_ID}._" } > body.md if [ -n "$number" ]; then # Editing an issue notifies no one: when the table's rows (one per moved # library) differ from the issue's, say so in a comment, which does. # Comment before the edit: should the edit fail, the next run comments # again rather than never. rows() { tr -d '\r' | grep '^| `' || true; } gh issue view "$number" --repo "$REPOSITORY" --json body --jq .body | rows > old-rows.md if ! rows < report.md | cmp -s old-rows.md -; then { echo "The list changed (run ${GITHUB_RUN_ID}):"; echo; cat report.md; } > comment.md gh issue comment "$number" --repo "$REPOSITORY" --body-file comment.md fi gh issue edit "$number" --repo "$REPOSITORY" --body-file body.md else gh issue create --repo "$REPOSITORY" --title "$title" --label dependencies --body-file body.md fi