Rules-based browser launcher for TUI + GNOME. switchyard.aly.codes
tui gome bowser go
0

Configure Feed

Select the types of activity you want to include in your feed.

ci: add nix, drop aarch64 flatpak, update tools

Aly Raffauf (Jun 22, 2026, 8:43 PM EDT) 10000ba8 4e785a35

+109 -67
+51 -53
.github/workflows/ci.yml
··· 6 6 pull_request: 7 7 branches: [master] 8 8 workflow_dispatch: 9 + inputs: 10 + publish: 11 + description: "Publish to AMO, Chrome Web Store, and GitHub Releases" 12 + type: boolean 13 + default: false 9 14 name: CI 15 + concurrency: 16 + group: ${{ github.workflow }}-${{ github.ref }} 17 + cancel-in-progress: true 10 18 jobs: 11 19 test: 12 20 name: "Test" 13 21 runs-on: ubuntu-latest 14 22 steps: 15 - - uses: actions/checkout@v4 16 - - uses: actions/setup-go@v5 23 + - uses: actions/checkout@v7 24 + - uses: actions/setup-go@v6 17 25 with: 18 26 go-version: "1.24" 19 - - uses: extractions/setup-just@v2 27 + - uses: extractions/setup-just@v4 20 28 - name: Check generated Flatpak Go module sources 21 29 run: | 22 30 scripts/generate-flatpak-go-modules.py 23 31 git diff --exit-code -- flatpak/go-modules.json 24 - - name: Run tests 25 - run: just test 26 - - name: Generate coverage report 32 + - name: Run tests with coverage 27 33 run: just test-coverage 28 34 - name: Display coverage summary 29 35 run: | ··· 32 38 go tool cover -func=coverage.out >> $GITHUB_STEP_SUMMARY 33 39 echo '```' >> $GITHUB_STEP_SUMMARY 34 40 - name: Upload coverage report 35 - uses: actions/upload-artifact@v4 41 + uses: actions/upload-artifact@v7 36 42 with: 37 43 name: coverage-report 38 44 path: coverage.out ··· 41 47 name: "Build WebExtension" 42 48 runs-on: ubuntu-latest 43 49 steps: 44 - - uses: actions/checkout@v4 45 - - uses: actions/setup-node@v4 50 + - uses: actions/checkout@v7 51 + - uses: actions/setup-node@v6 46 52 with: 47 53 node-version: "lts/*" 48 - - uses: extractions/setup-just@v2 49 - - name: Bundle Firefox extension 54 + - uses: extractions/setup-just@v4 55 + - name: Bundle extension for Firefox and Chrome 50 56 run: just bundle-extension 51 57 - name: Validate Firefox manifest 58 + run: jq -e '.background.scripts == ["build/background.js"] and (.background.service_worker | not)' firefox-extension/manifest.json 59 + - name: Validate Chrome manifest 52 60 run: | 53 - unzip -p switchyard-webextension.zip manifest.json > /tmp/manifest.json 54 - jq -e '.background.scripts == ["build/background.js"] and (.background.service_worker | not)' /tmp/manifest.json 61 + unzip -p switchyard-webextension-chrome.zip manifest.json > /tmp/manifest.chrome.json 62 + jq -e '.background.service_worker == "build/background.js" and (.background.scripts | not) and (.key | not)' /tmp/manifest.chrome.json 63 + - uses: actions/upload-artifact@v7 64 + with: 65 + name: firefox-extension 66 + path: firefox-extension 67 + - uses: actions/upload-artifact@v7 68 + with: 69 + name: chrome-extension 70 + path: switchyard-webextension-chrome.zip 55 71 56 72 build-flatpak: 57 - name: "Build Flatpak (${{ matrix.variant.arch }})" 58 - runs-on: ${{ matrix.variant.runner }} 59 - strategy: 60 - matrix: 61 - variant: 62 - - arch: x86_64 63 - runner: ubuntu-latest 64 - - arch: aarch64 65 - runner: ubuntu-24.04-arm 73 + name: "Build Flatpak" 74 + runs-on: ubuntu-latest 66 75 container: 67 76 image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-49 68 77 options: --privileged 69 78 steps: 70 - - uses: actions/checkout@v4 79 + - uses: actions/checkout@v7 71 80 - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 72 81 with: 73 - bundle: io.github.alyraffauf.Switchyard.Devel-${{ github.sha }}-${{ matrix.variant.arch }}.flatpak 82 + bundle: io.github.alyraffauf.Switchyard.Devel-${{ github.sha }}-x86_64.flatpak 74 83 manifest-path: flatpak/io.github.alyraffauf.Switchyard.Devel.yml 75 84 cache-key: flatpak-builder 76 - arch: ${{ matrix.variant.arch }} 85 + arch: x86_64 77 86 78 87 publish-amo: 79 88 name: "Publish to AMO" 80 - if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' 89 + if: startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && inputs.publish) 81 90 needs: [build-webextension] 82 91 runs-on: ubuntu-latest 83 92 steps: 84 - - uses: actions/checkout@v4 85 - - uses: actions/setup-node@v4 93 + - uses: actions/setup-node@v6 86 94 with: 87 95 node-version: "lts/*" 88 - - name: Build extension 89 - working-directory: webextension 90 - run: npm ci && npm run build 96 + - uses: actions/download-artifact@v8 97 + with: 98 + name: firefox-extension 99 + path: firefox-extension 91 100 - name: Submit to AMO 92 - run: | 93 - staging="$(mktemp -d)" 94 - cp -R webextension/build webextension/icons webextension/popup.html "${staging}/" 95 - rm -f "${staging}/build/manifest.firefox.json" 96 - cp webextension/manifest.firefox.json "${staging}/manifest.json" 97 - npx web-ext sign --source-dir="${staging}" --channel=listed --approval-timeout=0 --api-key=${{ secrets.AMO_JWT_ISSUER }} --api-secret=${{ secrets.AMO_JWT_SECRET }} 101 + run: npx web-ext sign --source-dir=firefox-extension --channel=listed --approval-timeout=0 --api-key=${{ secrets.AMO_JWT_ISSUER }} --api-secret=${{ secrets.AMO_JWT_SECRET }} 98 102 99 103 publish-cws: 100 104 name: "Publish to Chrome Web Store" 101 - if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' 105 + if: startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && inputs.publish) 102 106 needs: [build-webextension] 103 107 runs-on: ubuntu-latest 104 108 steps: 105 - - uses: actions/checkout@v4 106 - - uses: actions/setup-node@v4 109 + - uses: actions/setup-node@v6 107 110 with: 108 111 node-version: "lts/*" 109 - - name: Build extension 110 - working-directory: webextension 111 - run: npm ci && npm run build 112 - - name: Package extension 113 - working-directory: webextension 114 - run: | 115 - jq 'del(.key)' manifest.json > manifest.cws.json 116 - mv manifest.cws.json manifest.json 117 - zip -r ../switchyard-webextension.zip manifest.json popup.html build icons 112 + - uses: actions/download-artifact@v8 113 + with: 114 + name: chrome-extension 115 + path: . 118 116 - name: Submit to Chrome Web Store 119 - run: npx chrome-webstore-upload-cli@3 upload --source switchyard-webextension.zip --auto-publish 117 + run: npx chrome-webstore-upload-cli@3 upload --source switchyard-webextension-chrome.zip --auto-publish 120 118 env: 121 119 EXTENSION_ID: ${{ secrets.CWS_EXTENSION_ID }} 122 120 CLIENT_ID: ${{ secrets.CWS_CLIENT_ID }} ··· 125 123 126 124 publish-github: 127 125 name: "Publish GitHub Release" 128 - if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' 126 + if: startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && inputs.publish) 129 127 needs: [build-flatpak, test, publish-amo, publish-cws] 130 128 runs-on: ubuntu-latest 131 129 permissions: 132 130 contents: write 133 131 steps: 134 132 - name: Download Flatpak bundles 135 - uses: actions/download-artifact@v4 133 + uses: actions/download-artifact@v8 136 134 with: 137 135 pattern: io.github.alyraffauf.Switchyard.Devel-${{ github.sha }}-*.flatpak 138 136 merge-multiple: true 139 137 - name: Create Release 140 - uses: softprops/action-gh-release@v2 138 + uses: softprops/action-gh-release@v3 141 139 with: 142 140 files: | 143 141 *.flatpak
+23
.github/workflows/nix.yml
··· 1 + on: 2 + push: 3 + branches: [master] 4 + pull_request: 5 + branches: [master] 6 + workflow_dispatch: 7 + name: Nix 8 + concurrency: 9 + group: ${{ github.workflow }}-${{ github.ref }} 10 + cancel-in-progress: true 11 + jobs: 12 + build: 13 + name: "Build" 14 + runs-on: ubuntu-latest 15 + steps: 16 + - uses: actions/checkout@v7 17 + - uses: DeterminateSystems/determinate-nix-action@v3 18 + - uses: cachix/cachix-action@v17 19 + with: 20 + name: switchyard 21 + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} 22 + - name: Build packages 23 + run: nix build .#switchyard -L
+10 -7
.github/workflows/website.yml
··· 6 6 - ".github/workflows/website.yml" 7 7 workflow_dispatch: 8 8 name: Website 9 + concurrency: 10 + group: ${{ github.workflow }}-${{ github.ref }} 11 + cancel-in-progress: true 9 12 jobs: 10 13 publish: 11 14 name: "Build and Publish Image" ··· 14 17 contents: read 15 18 packages: write 16 19 steps: 17 - - uses: actions/checkout@v4 18 - - uses: actions/setup-node@v4 20 + - uses: actions/checkout@v7 21 + - uses: actions/setup-node@v6 19 22 with: 20 23 node-version: 22 21 24 cache: npm ··· 26 29 - name: Build site 27 30 run: npm run build 28 31 working-directory: website 29 - - uses: docker/setup-qemu-action@v3 30 - - uses: docker/setup-buildx-action@v3 32 + - uses: docker/setup-qemu-action@v4 33 + - uses: docker/setup-buildx-action@v4 31 34 - name: Log in to GHCR 32 - uses: docker/login-action@v3 35 + uses: docker/login-action@v4 33 36 with: 34 37 registry: ghcr.io 35 38 username: ${{ github.actor }} 36 39 password: ${{ secrets.GITHUB_TOKEN }} 37 40 - name: Extract image metadata 38 41 id: meta 39 - uses: docker/metadata-action@v5 42 + uses: docker/metadata-action@v6 40 43 with: 41 44 images: ghcr.io/${{ github.repository_owner }}/switchyard-website 42 45 tags: | 43 46 type=raw,value=latest 44 47 type=sha 45 48 - name: Build and push 46 - uses: docker/build-push-action@v6 49 + uses: docker/build-push-action@v7 47 50 with: 48 51 context: website 49 52 platforms: linux/amd64,linux/arm64
+2 -1
.gitignore
··· 15 15 coverage.out 16 16 repo/ 17 17 switchyard 18 - switchyard-webextension.zip 18 + switchyard-webextension-chrome.zip 19 + firefox-extension/ 19 20 result
+23 -6
justfile
··· 80 80 build-extension: 81 81 cd webextension && npm ci && npm run build 82 82 83 - # Bundle the browser extension into a zip archive 84 - bundle-extension: build-extension 83 + # Package the already-built extension as a Firefox-targeted directory 84 + package-extension-firefox: 85 + #!/usr/bin/env bash 86 + set -euo pipefail 87 + root="{{justfile_directory()}}" 88 + extdir="${root}/webextension" 89 + outdir="${root}/firefox-extension" 90 + 91 + rm -rf "${outdir}" 92 + mkdir -p "${outdir}" 93 + cp -R "${extdir}/build" "${extdir}/icons" "${extdir}/popup.html" "${outdir}/" 94 + rm -f "${outdir}/build/manifest.firefox.json" 95 + cp "${extdir}/manifest.firefox.json" "${outdir}/manifest.json" 96 + echo "Extension packaged: firefox-extension/" 97 + 98 + # Package the already-built extension as a Chrome-targeted zip archive 99 + package-extension-chrome: 85 100 #!/usr/bin/env bash 86 101 set -euo pipefail 87 102 root="{{justfile_directory()}}" 88 103 extdir="${root}/webextension" 89 - outfile="${root}/switchyard-webextension.zip" 104 + outfile="${root}/switchyard-webextension-chrome.zip" 90 105 staging="$(mktemp -d)" 91 106 trap 'rm -rf "${staging}"' EXIT 92 107 93 108 rm -f "${outfile}" 94 109 cp -R "${extdir}/build" "${extdir}/icons" "${extdir}/popup.html" "${staging}/" 95 - rm -f "${staging}/build/manifest.firefox.json" 96 - cp "${extdir}/manifest.firefox.json" "${staging}/manifest.json" 110 + jq 'del(.key)' "${extdir}/manifest.json" > "${staging}/manifest.json" 97 111 cd "${staging}" && zip -r "${outfile}" . 98 - echo "Extension bundled: switchyard-webextension.zip" 112 + echo "Extension bundled: switchyard-webextension-chrome.zip" 113 + 114 + # Build the extension once and package it for both Firefox and Chrome 115 + bundle-extension: build-extension package-extension-firefox package-extension-chrome 99 116 100 117 # Cut a new release: bump version, commit, tag, and push master + tag 101 118 release version: