diff --git a/.github/workflows/gen_ubuntu24.04.yml b/.github/workflows/gen_ubuntu24.04.yml index b03753761..5e1a0bcb3 100644 --- a/.github/workflows/gen_ubuntu24.04.yml +++ b/.github/workflows/gen_ubuntu24.04.yml @@ -18,7 +18,10 @@ on: - "assets/wezterm-nautilus.py" - "assets/wezterm.appdata.xml" - "assets/wezterm.desktop" + - "ci/appimage.sh" + - "ci/appstreamcli" - "ci/deploy.sh" + - "ci/source-archive.sh" - "ci/tag-name.sh" - "get-deps" - "termwiz/data/wezterm.terminfo" @@ -26,7 +29,9 @@ on: jobs: build: runs-on: "ubuntu-latest" - container: "ubuntu:24.04" + container: + image: "ubuntu:24.04" + options: --privileged env: CARGO_INCREMENTAL: "0" SCCACHE_GHA_ENABLED: "true" @@ -103,6 +108,15 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" + - name: "Install libfuse2" + shell: bash + run: "apt-get install -y libfuse2" + - name: "Source Tarball" + shell: bash + run: "bash ci/source-archive.sh" + - name: "Build AppImage" + shell: bash + run: "bash ci/appimage.sh" - name: "Upload artifact" uses: actions/upload-artifact@v4 with: @@ -110,3 +124,5 @@ jobs: path: | wezterm-*.deb wezterm-*.xz + *src.tar.gz + *.AppImage diff --git a/.github/workflows/gen_ubuntu24.04_continuous.yml b/.github/workflows/gen_ubuntu24.04_continuous.yml index a238084c0..e5900972f 100644 --- a/.github/workflows/gen_ubuntu24.04_continuous.yml +++ b/.github/workflows/gen_ubuntu24.04_continuous.yml @@ -20,7 +20,10 @@ on: - "assets/wezterm-nautilus.py" - "assets/wezterm.appdata.xml" - "assets/wezterm.desktop" + - "ci/appimage.sh" + - "ci/appstreamcli" - "ci/deploy.sh" + - "ci/source-archive.sh" - "ci/tag-name.sh" - "get-deps" - "termwiz/data/wezterm.terminfo" @@ -28,7 +31,9 @@ on: jobs: build: runs-on: "ubuntu-latest" - container: "ubuntu:24.04" + container: + image: "ubuntu:24.04" + options: --privileged env: BUILD_REASON: "Schedule" CARGO_INCREMENTAL: "0" @@ -106,6 +111,15 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" + - name: "Install libfuse2" + shell: bash + run: "apt-get install -y libfuse2" + - name: "Source Tarball" + shell: bash + run: "bash ci/source-archive.sh" + - name: "Build AppImage" + shell: bash + run: "bash ci/appimage.sh" - name: "Upload artifact" uses: actions/upload-artifact@v4 with: @@ -113,6 +127,8 @@ jobs: path: | wezterm-*.deb wezterm-*.xz + *src.tar.gz + *.AppImage retention-days: 5 upload: @@ -136,9 +152,9 @@ jobs: name: "ubuntu24.04" - name: "Checksum" shell: bash - run: "for f in wezterm-*.deb wezterm-*.xz ; do sha256sum $f > $f.sha256 ; done" + run: "for f in wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage ; do sha256sum $f > $f.sha256 ; done" - name: "Upload to Nightly Release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash - run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz *.sha256" + run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage *.sha256" diff --git a/.github/workflows/gen_ubuntu24.04_tag.yml b/.github/workflows/gen_ubuntu24.04_tag.yml index d66a60f24..487a07439 100644 --- a/.github/workflows/gen_ubuntu24.04_tag.yml +++ b/.github/workflows/gen_ubuntu24.04_tag.yml @@ -8,7 +8,9 @@ on: jobs: build: runs-on: "ubuntu-latest" - container: "ubuntu:24.04" + container: + image: "ubuntu:24.04" + options: --privileged env: CARGO_INCREMENTAL: "0" SCCACHE_GHA_ENABLED: "true" @@ -85,6 +87,15 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" + - name: "Install libfuse2" + shell: bash + run: "apt-get install -y libfuse2" + - name: "Source Tarball" + shell: bash + run: "bash ci/source-archive.sh" + - name: "Build AppImage" + shell: bash + run: "bash ci/appimage.sh" - name: "Upload artifact" uses: actions/upload-artifact@v4 with: @@ -92,6 +103,8 @@ jobs: path: | wezterm-*.deb wezterm-*.xz + *src.tar.gz + *.AppImage upload: runs-on: ubuntu-latest @@ -108,13 +121,27 @@ jobs: run: "git config --global --add safe.directory /__w/wezterm/wezterm" - name: "checkout repo" uses: actions/checkout@v5 + - name: "Checkout linuxbrew tap" + uses: actions/checkout@v5 + with: + repository: "wez/homebrew-wezterm-linuxbrew" + path: "linuxbrew-wezterm" + token: "${{ secrets.GH_PAT }}" + - name: "Update linuxbrew tap formula" + shell: bash + run: "cp wezterm-linuxbrew.rb linuxbrew-wezterm/Formula/wezterm.rb" + - name: "Commit linuxbrew tap changes" + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Automated update to match latest tag" + repository: "linuxbrew-wezterm" - name: "Download artifact" uses: actions/download-artifact@v5 with: name: "ubuntu24.04" - name: "Checksum" shell: bash - run: "for f in wezterm-*.deb wezterm-*.xz ; do sha256sum $f > $f.sha256 ; done" + run: "for f in wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage ; do sha256sum $f > $f.sha256 ; done" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -124,4 +151,18 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash - run: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) wezterm-*.deb wezterm-*.xz *.sha256" + run: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage *.sha256" + - name: "Checkout flathub/org.wezfurlong.wezterm" + uses: actions/checkout@v5 + with: + repository: "flathub/org.wezfurlong.wezterm" + path: "flathub" + token: "${{ secrets.GH_PAT }}" + - name: "Create flathub commit and push" + shell: bash + run: "bash ci/make-flathub-pr.sh" + - name: "Submit PR" + env: + GITHUB_TOKEN: ${{ secrets.GH_PAT }} + shell: bash + run: 'cd flathub && gh pr create --fill --body "PR automatically created by release automation in the wezterm repo"' diff --git a/ci/generate-workflows.py b/ci/generate-workflows.py index f64b2ba0d..041afb234 100755 --- a/ci/generate-workflows.py +++ b/ci/generate-workflows.py @@ -4,6 +4,11 @@ import sys import glob from copy import deepcopy +# The build from this target will be pushed to the gemfury APT repo +GEMFURY_TARGET = "ubuntu:22.04" +# The build from this target will be baked into the AppImage +APPIMAGE_TARGET = "ubuntu:24.04" + TRIGGER_PATHS = [ "**/*.rs", "**/Cargo.lock", @@ -182,7 +187,6 @@ class Target(object): bootstrap_git=False, rust_target=None, continuous_only=False, - app_image=False, is_tag=False, ): if not name: @@ -196,7 +200,7 @@ class Target(object): self.bootstrap_git = bootstrap_git self.rust_target = rust_target self.continuous_only = continuous_only - self.app_image = app_image + self.app_image = container == APPIMAGE_TARGET self.env = {} self.is_tag = is_tag @@ -627,7 +631,7 @@ rustup default {toolchain} patterns.append("*.sha256") glob = " ".join(patterns) - if self.container == "ubuntu:22.04": + if self.container == GEMFURY_TARGET: steps += [ RunStep( "Upload to gemfury", @@ -662,7 +666,7 @@ rustup default {toolchain} patterns.append("*.sha256") glob = " ".join(patterns) - if self.container == "ubuntu:22.04": + if self.container == GEMFURY_TARGET: steps += [ RunStep( "Upload to gemfury", @@ -1013,12 +1017,19 @@ TARGETS = [ def generate_actions(namer, jobber, trigger, is_continuous, is_tag=False): + have_gemfury = False + have_appimage = False for t in TARGETS: # Clone the definition, as some Target methods called # in the body below have side effects that we don't # want to bleed across into different schedule types t = deepcopy(t) + if t.app_image: + have_appimage = True + if t.container == GEMFURY_TARGET: + have_gemfury = True + t.is_tag = is_tag # if t.continuous_only and not is_continuous: # continue @@ -1092,6 +1103,10 @@ jobs: yaml.safe_load(f) except ImportError: pass + if not have_appimage: + raise NotImplementedError("no appimage target is present") + if not have_gemfury: + raise NotImplementedError("no gemfury target is present") def generate_pr_actions():