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
1 change: 1 addition & 0 deletions .github/workflows/chromium-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ jobs:
NOTARY_API_KEY_ID: ${{ secrets.NOTARY_API_KEY_ID }}
NOTARY_API_ISSUER: ${{ secrets.NOTARY_API_ISSUER }}
SPARKLE_ED_PRIVATE_KEY: ${{ secrets.SPARKLE_ED_PRIVATE_KEY }}
HOMEBREW_TAP_DEPLOY_KEY: ${{ secrets.HOMEBREW_TAP_DEPLOY_KEY }}

report:
needs: [watch, propose, open, tag, build]
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
- run: for d in . nsh-shared mobile linux; do (cd "$d" && cargo fmt --all --check); done
- run: scripts/check-workflows.sh && scripts/check-workflows.test.sh && scripts/ci-changes.test.sh && scripts/check-dco.test.sh
- run: scripts/check-workflows.sh && scripts/check-workflows.test.sh && scripts/ci-changes.test.sh && scripts/check-dco.test.sh && scripts/attestation.test.sh
- run: python3 scripts/mobile-store.test.py
- run: scripts/third-party-licenses.sh --check
- run: cargo clippy $CRATES --all-targets --locked -- -D warnings
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo clippy $CRATES --all-targets --locked -- -D warnings
- run: cargo test $CRATES --locked
- run: scripts/dmg.test.sh && scripts/windows-feed.test.sh
- run: scripts/dmg.test.sh && scripts/windows-feed.test.sh && scripts/homebrew-cask.test.sh
- name: Chromium feature
run: |
scripts/fetch-ninja.sh "$RUNNER_TEMP/ninja"
Expand Down Expand Up @@ -148,6 +148,8 @@ jobs:
# Links tarn.dll, whose delay-load flags apply only to the real cdylib.
- run: cargo build --locked -p app-dll
- run: powershell -NoProfile -ExecutionPolicy Bypass -File scripts/sign-windows.test.ps1
- run: powershell -NoProfile -ExecutionPolicy Bypass -File scripts/install-script.test.ps1
- run: powershell -NoProfile -ExecutionPolicy Bypass -File scripts/set-exe-icon.test.ps1

nsh-shared:
needs: changes
Expand Down
160 changes: 141 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ on:
required: false
CHROMIUM_UPDATE_APP_KEY:
required: false
HOMEBREW_TAP_DEPLOY_KEY:
required: false

permissions: {}

Expand Down Expand Up @@ -196,7 +198,9 @@ jobs:
scripts/package-windows.sh dist/Tarn
setup="$(scripts/installer-windows.sh dist/Tarn dist | tail -n1)"
mv "$setup" "dist/Tarn-${TAG}-windows-x64-setup-unsigned.exe"
cd dist && 7z a -tzip "Tarn-${TAG}-windows-x64-unsigned.zip" Tarn >/dev/null && rm -rf Tarn
cd dist && 7z a -tzip "Tarn-${TAG}-windows-x64-unsigned.zip" Tarn >/dev/null
# The same folder runs without installing once tarn-portable sits beside tarn.exe (browser_core::portable_dir).
touch Tarn/tarn-portable && 7z a -tzip "Tarn-${TAG}-windows-x64-portable-unsigned.zip" Tarn >/dev/null && rm -rf Tarn
- id: upload
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
Expand Down Expand Up @@ -563,7 +567,8 @@ jobs:
if-no-files-found: error

# Runs no build code: it takes each build job's files by their fixed names, so no job can replace
# another platform's file, then writes SHA256SUMS and attests it with the binaries and SBOMs.
# another platform's file, fills install.ps1's template with the Windows files it took, then writes
# SHA256SUMS and attests it with the binaries, the SBOMs and install.ps1.
# Engine updates (chromium-update.yml) and manual runs ship the macOS bundle alone, without
# waiting for the rest.
assets:
Expand All @@ -577,6 +582,13 @@ jobs:
id-token: write
attestations: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.commit }}
path: source
persist-credentials: false
sparse-checkout: packaging/windows/install.ps1
sparse-checkout-cone-mode: false
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
artifact-ids: ${{ needs.build.outputs.artifact }}
Expand Down Expand Up @@ -657,13 +669,24 @@ jobs:
else
take signed "Tarn-${TAG}.zip" "Tarn-${TAG}.dmg" appcast.xml windows-update.json windows-update.json.sig
take sbom-clients "Tarn-${TAG}-windows-x64.cdx.json" "Tarn-${TAG}-linux.cdx.json" "Tarn-${TAG}-ios.cdx.json" "Tarn-${TAG}-android.cdx.json"
take windows "Tarn-${TAG}-windows-x64-unsigned.zip" "Tarn-${TAG}-windows-x64-setup-unsigned.exe"
take windows "Tarn-${TAG}-windows-x64-unsigned.zip" "Tarn-${TAG}-windows-x64-portable-unsigned.zip" "Tarn-${TAG}-windows-x64-setup-unsigned.exe"
take linux "tarn_${version}_debian*_amd64.deb" "tarn_${version}_ubuntu*_amd64.deb" \
"tarn-${version}-*.x86_64.rpm" "tarn-${version}-*-x86_64.pkg.tar.zst"
take ios "Tarn-${TAG}-ios-unsigned.zip"
take android "Tarn-${TAG}-android-unsigned.apk" "Tarn-${TAG}-android-unsigned.aab"
take android-sbom "Tarn-${TAG}-android-java.cdx.json"
fi
if [[ "$MACOS_ONLY" != true ]]; then
# Fills the template's placeholders with this run's Windows files; text substitution only.
setup="Tarn-${TAG}-windows-x64-setup-unsigned.exe" portable="Tarn-${TAG}-windows-x64-portable-unsigned.zip"
[[ "$TAG" =~ ^(v[0-9]+(\.[0-9]+){1,3}|nightly)$ && "$GITHUB_REPOSITORY" =~ ^[A-Za-z0-9-]+/[A-Za-z0-9._-]+$ ]] \
|| { echo "unexpected tag $TAG or repository $GITHUB_REPOSITORY for install.ps1" >&2; exit 1; }
sed -e "s|@TAG@|$TAG|g" -e "s|@REPO@|$GITHUB_REPOSITORY|g" \
-e "s|@SETUP_NAME@|$setup|g" -e "s|@SETUP_SHA256@|$(sha256sum "dist/$setup" | cut -d' ' -f1)|g" \
-e "s|@PORTABLE_NAME@|$portable|g" -e "s|@PORTABLE_SHA256@|$(sha256sum "dist/$portable" | cut -d' ' -f1)|g" \
source/packaging/windows/install.ps1 > dist/install.ps1
! grep -qE '@[A-Z0-9_]+@' dist/install.ps1 || { echo "install.ps1 keeps a placeholder" >&2; exit 1; }
fi
cd dist && sha256sum ./* > SHA256SUMS
- id: predicate
env:
Expand All @@ -683,6 +706,7 @@ jobs:
dist/*.apk
dist/*.aab
dist/*.cdx.json
dist/*.ps1
dist/SHA256SUMS
predicate-type: https://github.com/Quavon-dev/tarn-browser/attestations/release/v1
predicate: ${{ steps.predicate.outputs.json }}
Expand Down Expand Up @@ -719,8 +743,21 @@ jobs:
sha256sum --strict -c SHA256SUMS
extra="$(comm -23 <(find . -maxdepth 1 -type f ! -name SHA256SUMS | sort) <(awk '{print $2}' SHA256SUMS | sort))"
[[ -z "$extra" ]] || { echo "dist holds files SHA256SUMS does not list: $extra" >&2; exit 1; }
- if: ${{ !inputs.nightly }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.commit }}
path: source
persist-credentials: false
sparse-checkout: |
CHANGELOG.md
packaging/cef.lock
packaging/updates.conf
scripts/attestation.sh
sparse-checkout-cone-mode: false
# Windows checks windows-update.json in the latest release; a macOS-only release carries the last
# signed one over unchanged, so its signature still holds and Windows keeps a verified feed.
# signed one over unchanged, so its signature still holds and Windows keeps a verified feed, and
# the last install.ps1, so the install command keeps working.
- if: (github.event_name != 'push' || inputs.commit != '') && !inputs.nightly && !inputs.full
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -735,6 +772,13 @@ jobs:
else
echo "::warning::the latest release has no Windows update feed to carry over"
fi
# install.ps1 names the earlier release's Windows files by tag and SHA-256, so it stays valid as well.
if grep -qx install.ps1 <<<"$assets"; then
mkdir -p carried
gh release download --pattern install.ps1 --dir carried
source/scripts/attestation.sh script carried/install.ps1 >/dev/null
mv carried/install.ps1 dist/
fi
- if: inputs.nightly
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -753,17 +797,6 @@ jobs:
--notes "Nightly build of $COMMIT: the latest changes, before they are tested in a release. Settings › General › Nightly builds updates to it on macOS and Windows."
[[ "$(gh api "repos/$GH_REPO/git/ref/tags/$TAG" --jq .object.sha)" == "$COMMIT" ]] \
|| { echo "$TAG does not name $COMMIT" >&2; gh release delete "$TAG" --yes; exit 1; }
- if: ${{ !inputs.nightly }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.commit }}
path: source
persist-credentials: false
sparse-checkout: |
CHANGELOG.md
packaging/cef.lock
packaging/updates.conf
sparse-checkout-cone-mode: false
- if: ${{ !inputs.nightly }}
env:
GH_TOKEN: ${{ github.token }}
Expand Down Expand Up @@ -851,11 +884,33 @@ jobs:
own="$(pair "$highest")" || rc=$?
[[ "$rc" != 2 ]] || { echo "could not download the Windows feed of $highest" >&2; exit 1; }
fi
if [[ -n "$best" && ( -z "$own" || "$(printf '%s\n%s\n' "$own" "$best_version" | sort -V | tail -n1)" == "$best_version" ) ]] \
&& ! { cmp -s "pair/$best/windows-update.json" "pair/$highest/windows-update.json" \
if [[ -n "$best" && ( -z "$own" || "$(printf '%s\n%s\n' "$own" "$best_version" | sort -V | tail -n1)" == "$best_version" ) ]]; then
if ! { cmp -s "pair/$best/windows-update.json" "pair/$highest/windows-update.json" \
&& cmp -s "pair/$best/windows-update.json.sig" "pair/$highest/windows-update.json.sig"; }; then
gh release upload "$highest" "pair/$best/windows-update.json" "pair/$best/windows-update.json.sig" --clobber
echo "::notice::$highest now carries the Windows feed of $best (Windows $best_version)"
gh release upload "$highest" "pair/$best/windows-update.json" "pair/$best/windows-update.json.sig" --clobber
echo "::notice::$highest now carries the Windows feed of $best (Windows $best_version)"
fi
# Apart from the feed, so a re-run repairs a script an earlier run failed to copy.
if gh release view "$best" --json assets --jq '.assets[].name' | grep -qx install.ps1; then
gh release download "$best" --pattern install.ps1 --dir "pair/$best" --clobber
origin="$(source/scripts/attestation.sh script "pair/$best/install.ps1")"
listed="$(gh release view "$highest" --json assets --jq '.assets[].name')"
if grep -qx install.ps1 <<<"$listed"; then
mkdir -p script
gh release download "$highest" --pattern install.ps1 --dir script --clobber
current="$(source/scripts/attestation.sh tag script/install.ps1)"
[[ -n "$current" ]] || { echo "install.ps1 of $highest names no release tag" >&2; exit 1; }
# Never replace a script that names a newer release than the one offered.
if ! cmp -s "pair/$best/install.ps1" script/install.ps1 \
&& [[ "$(printf '%s\n%s\n' "${current#v}" "${origin#v}" | sort -V | tail -n1)" == "${origin#v}" ]]; then
gh release upload "$highest" "pair/$best/install.ps1" --clobber
fi
else
gh release upload "$highest" "pair/$best/install.ps1" --clobber
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
fi
else
echo "::warning::$best has no install.ps1; $highest keeps its own, which may name older Windows files"
fi
fi
gh workflow run linux-repo.yml --ref main
- name: Start mobile store uploads
Expand All @@ -864,3 +919,70 @@ jobs:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh workflow run mobile-store.yml --ref main -f tag="$TAG" -f platform=both

# Points the Homebrew cask in <owner>/homebrew-tarn at the latest release's disk image, checked
# against its attested SHA256SUMS. The tap's deploy key is the only secret of the homebrew-tap
# environment; without it the job notes that and changes nothing.
homebrew:
needs: publish
if: ${{ !inputs.nightly }}
# One push at a time, so an older run cannot land after a newer release's cask.
concurrency:
group: homebrew-tap
cancel-in-progress: false
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
runs-on: ubuntu-24.04
environment: homebrew-tap
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.commit }}
path: source
persist-credentials: false
sparse-checkout: |
scripts/homebrew-cask.sh
scripts/attestation.sh
packaging/homebrew/tarn.rb.in
sparse-checkout-cone-mode: false
- id: cask
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
set -euo pipefail
# The latest release, not necessarily this run's: a queued newer run may have been replaced.
latest="$(gh release view --json tagName --jq .tagName)"
gh release download "$latest" --pattern SHA256SUMS --dir sums
source/scripts/attestation.sh sums sums/SHA256SUMS "$latest"
sha="$(awk -v dmg="./Tarn-${latest}.dmg" '$2 == dmg { print $1 }' sums/SHA256SUMS)"
source/scripts/homebrew-cask.sh "$latest" "$sha" "$GH_REPO" > tarn.rb
echo "tag=$latest" >> "$GITHUB_OUTPUT"
echo "ready=true" >> "$GITHUB_OUTPUT"
- if: steps.cask.outputs.ready == 'true'
env:
GH_REPO: ${{ github.repository }}
CASK_TAG: ${{ steps.cask.outputs.tag }}
DEPLOY_KEY: ${{ secrets.HOMEBREW_TAP_DEPLOY_KEY }}
run: |
set -euo pipefail
if [[ -z "$DEPLOY_KEY" ]]; then
echo "::notice::HOMEBREW_TAP_DEPLOY_KEY is not set; the Homebrew cask is not updated"
exit 0
fi
work="$(mktemp -d)"
trap 'rm -rf "$work"' EXIT
printf '%s\n' "$DEPLOY_KEY" > "$work/key"
chmod 600 "$work/key"
# GitHub's host key, as https://api.github.com/meta lists it.
echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' > "$work/known_hosts"
export GIT_SSH_COMMAND="ssh -i $work/key -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$work/known_hosts"
git clone -q --depth 1 "git@github.com:${GH_REPO%%/*}/homebrew-tarn.git" tap
mkdir -p tap/Casks && cp tarn.rb tap/Casks/tarn.rb
git -C tap add Casks/tarn.rb
if git -C tap diff --cached --quiet; then
echo "the cask already names $CASK_TAG"
exit 0
fi
git -C tap -c user.name=Tarn -c user.email=accounts@quavon.de commit -q -m "tarn ${CASK_TAG#v}"
git -C tap push -q origin HEAD
1 change: 1 addition & 0 deletions .github/workflows/start-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ jobs:
NOTARY_API_ISSUER: ${{ secrets.NOTARY_API_ISSUER }}
SPARKLE_ED_PRIVATE_KEY: ${{ secrets.SPARKLE_ED_PRIVATE_KEY }}
CHROMIUM_UPDATE_APP_KEY: ${{ secrets.CHROMIUM_UPDATE_APP_KEY }}
HOMEBREW_TAP_DEPLOY_KEY: ${{ secrets.HOMEBREW_TAP_DEPLOY_KEY }}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ All notable changes to Tarn are documented in this file. The format is based on

### Added

- Install with one command: `brew install --cask quavon-dev/tarn/tarn` on macOS (the cask follows
each release; Tarn keeps updating itself), and on Windows
`irm https://github.com/Quavon-dev/tarn-browser/releases/latest/download/install.ps1 | iex`,
which installs for the current user after checking the installer's SHA-256.
- A portable Windows download, `Tarn-<version>-windows-x64-portable-unsigned.zip`: unzip it anywhere and
start `tarn.exe`; profiles and site data stay in the `Data` folder beside it. It tells you when a new version
is out instead of installing one; `install.ps1 -Portable -Path <folder>` unpacks or updates it,
keeping `Data`.
- Windows: `tarn.exe` shows the Tarn icon in Explorer, on the taskbar and in its windows instead
of the Chromium launcher's.
- Sites that ask for a client certificate offer the certificates they accept and send only the
one picked; Cancel sends none (macOS and Windows). Chromium tabs no longer send the first
certificate without asking.
Expand Down
2 changes: 1 addition & 1 deletion PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Settings › Privacy › Connections Tarn makes on macOS and Windows.

| Connection | Receiver | What they see | Status |
|---|---|---|---|
| Update check | GitHub (Releases of this repository) | Your IP address and Tarn version (on Windows only your IP address: Tarn fetches the signed `windows-update.json` and, when it names a later version, downloads that installer); from the `nightly` release in place of the latest one while Settings › General › Nightly builds is on | Once a day while Settings › General › Check for updates automatically is on (the default; on Windows an hour after a check that failed), and when you choose Tarn › Check for Updates… or Settings › General › Check Now, on macOS and Windows |
| Update check | GitHub (Releases of this repository) | Your IP address and Tarn version (on Windows only your IP address: Tarn fetches the signed `windows-update.json` and, when it names a later version, downloads that installer; a portable Tarn downloads nothing and offers the release page); from the `nightly` release in place of the latest one while Settings › General › Nightly builds is on | Once a day while Settings › General › Check for updates automatically is on (the default; on Windows an hour after a check that failed), and when you choose Tarn › Check for Updates… or Settings › General › Check Now, on macOS and Windows |
| Filter-list update | GitHub (Releases of this repository) | Your IP address. Every list is downloaded whatever you switched on, so the download does not reveal your blocking choices | Once a day, on macOS, Windows and Linux; switch off in Settings › Privacy |
| Fraudulent-website check | Apple, which relays Google Safe Browsing; done by WebKit itself, on macOS and iOS. On Android, Google directly, done by the system WebView's Safe Browsing | Shortened hashes of the addresses you visit, not the addresses | While "Block dangerous sites" is on (the default); off with that switch. On iOS and Android the web view's default, which Tarn leaves on and no switch turns off. Windows and Linux make no such check |
| Extension catalog and downloads | GitHub (the repository you name, or the official catalog in `Quavon-dev/tarn-extensions`, not offered yet because its signing key is not set) | Your IP address and which repository or extension you install or check | Only when you click Install, Check for Updates or Show Official Extensions in Settings › Extensions; an Install in Tarn link from extensions.tarnbrowser.com makes no request until you click Install on the confirmation it opens there; switch off in Settings › Privacy (installing from a file keeps working) |
Expand Down
Loading
Loading