From 4143d254aaa22ad5f10e96b2660f341e7cedfc4c Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 8 Dec 2021 19:57:25 -0700 Subject: [PATCH] ci: tidy up separate uploader job Enable it for tags/releases too, and remove some additional git fetches and installation of the GH CLI inside containers that we no longer need. --- .github/workflows/gen_centos8.yml | 20 +---- .github/workflows/gen_centos8_continuous.yml | 20 ----- .github/workflows/gen_centos8_tag.yml | 23 +++-- .github/workflows/gen_debian10.3.yml | 33 +------ .../workflows/gen_debian10.3_continuous.yml | 40 --------- .github/workflows/gen_debian10.3_tag.yml | 35 +++----- .github/workflows/gen_debian11.yml | 33 +------ .github/workflows/gen_debian11_continuous.yml | 40 --------- .github/workflows/gen_debian11_tag.yml | 35 +++----- .github/workflows/gen_debian9.12.yml | 33 +------ .../workflows/gen_debian9.12_continuous.yml | 40 --------- .github/workflows/gen_debian9.12_tag.yml | 35 +++----- .github/workflows/gen_fedora33.yml | 20 +---- .github/workflows/gen_fedora33_continuous.yml | 20 ----- .github/workflows/gen_fedora33_tag.yml | 23 +++-- .github/workflows/gen_fedora34.yml | 20 +---- .github/workflows/gen_fedora34_continuous.yml | 20 ----- .github/workflows/gen_fedora34_tag.yml | 23 +++-- .github/workflows/gen_fedora35.yml | 20 +---- .github/workflows/gen_fedora35_continuous.yml | 20 ----- .github/workflows/gen_fedora35_tag.yml | 23 +++-- .github/workflows/gen_macos.yml | 19 +--- .github/workflows/gen_macos_continuous.yml | 14 --- .github/workflows/gen_macos_tag.yml | 45 +++++----- .github/workflows/gen_ubuntu18.yml | 19 ++-- .github/workflows/gen_ubuntu18_continuous.yml | 10 --- .github/workflows/gen_ubuntu18_tag.yml | 37 ++++---- .github/workflows/gen_ubuntu20.04.yml | 33 +------ .../workflows/gen_ubuntu20.04_continuous.yml | 40 --------- .github/workflows/gen_ubuntu20.04_tag.yml | 35 +++----- .github/workflows/gen_windows.yml | 15 +--- .github/workflows/gen_windows_continuous.yml | 10 --- .github/workflows/gen_windows_tag.yml | 17 ++-- ci/generate-workflows.py | 86 +++++++------------ 34 files changed, 204 insertions(+), 752 deletions(-) diff --git a/.github/workflows/gen_centos8.yml b/.github/workflows/gen_centos8.yml index 39bdc9927..0301596dd 100644 --- a/.github/workflows/gen_centos8.yml +++ b/.github/workflows/gen_centos8.yml @@ -25,12 +25,6 @@ jobs: - name: "Enable PowerTools" shell: bash run: "dnf config-manager --set-enabled powertools" - - name: "Enable GH CLI repo" - shell: bash - run: "dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo" - - name: "Install GH CLI" - shell: bash - run: "dnf install -y gh" - name: "Install git" shell: bash run: "yum install -y git" @@ -47,12 +41,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -85,13 +73,11 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" - - name: "Move Package for artifact upload" + - name: "Move RPM" shell: bash - run: | - mkdir pkg_ - mv ~/rpmbuild/RPMS/*/*.rpm pkg_ + run: "mv ~/rpmbuild/RPMS/*/*.rpm ." - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "centos8" - path: "pkg_" + path: "wezterm-*.rpm" diff --git a/.github/workflows/gen_centos8_continuous.yml b/.github/workflows/gen_centos8_continuous.yml index e4db2bfac..20ee87908 100644 --- a/.github/workflows/gen_centos8_continuous.yml +++ b/.github/workflows/gen_centos8_continuous.yml @@ -31,16 +31,6 @@ jobs: run: | export BUILD_REASON=Schedule dnf config-manager --set-enabled powertools - - name: "Enable GH CLI repo" - shell: bash - run: | - export BUILD_REASON=Schedule - dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo - - name: "Install GH CLI" - shell: bash - run: | - export BUILD_REASON=Schedule - dnf install -y gh - name: "Install git" shell: bash run: | @@ -65,16 +55,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_centos8_tag.yml b/.github/workflows/gen_centos8_tag.yml index dd9097563..dea02797e 100644 --- a/.github/workflows/gen_centos8_tag.yml +++ b/.github/workflows/gen_centos8_tag.yml @@ -16,12 +16,6 @@ jobs: - name: "Enable PowerTools" shell: bash run: "dnf config-manager --set-enabled powertools" - - name: "Enable GH CLI repo" - shell: bash - run: "dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo" - - name: "Install GH CLI" - shell: bash - run: "dnf install -y gh" - name: "Install git" shell: bash run: "yum install -y git" @@ -38,12 +32,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -81,6 +69,17 @@ jobs: with: name: "centos8" path: "wezterm-*.rpm" + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "centos8" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gen_debian10.3.yml b/.github/workflows/gen_debian10.3.yml index f60b363fd..12b14b898 100644 --- a/.github/workflows/gen_debian10.3.yml +++ b/.github/workflows/gen_debian10.3.yml @@ -34,24 +34,6 @@ jobs: - name: "Update APT" shell: bash run: "apt update" - - name: "Install https support for apt" - shell: bash - run: "apt-get install -y apt-transport-https ca-certificates" - - name: "Install GitHub keyring" - shell: bash - run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" - - name: "Add GitHub package list" - shell: bash - run: 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null' - - name: "Show GitHub package list" - shell: bash - run: "cat /etc/apt/sources.list.d/*" - - name: "Update APT again" - shell: bash - run: "apt update" - - name: "Install GH CLI" - shell: bash - run: "apt install -y gh" - name: "Ensure /run/sshd exists" shell: bash run: "mkdir -p /run/sshd" @@ -62,12 +44,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -100,13 +76,10 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" - - name: "Move Package for artifact upload" - shell: bash - run: | - mkdir pkg_ - mv *.deb *.xz pkg_ - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "debian10.3" - path: "pkg_" + path: | + wezterm-*.deb + wezterm-*.xz diff --git a/.github/workflows/gen_debian10.3_continuous.yml b/.github/workflows/gen_debian10.3_continuous.yml index 60a76277a..e06c25bd9 100644 --- a/.github/workflows/gen_debian10.3_continuous.yml +++ b/.github/workflows/gen_debian10.3_continuous.yml @@ -46,36 +46,6 @@ jobs: run: | export BUILD_REASON=Schedule apt update - - name: "Install https support for apt" - shell: bash - run: | - export BUILD_REASON=Schedule - apt-get install -y apt-transport-https ca-certificates - - name: "Install GitHub keyring" - shell: bash - run: | - export BUILD_REASON=Schedule - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg - - name: "Add GitHub package list" - shell: bash - run: | - export BUILD_REASON=Schedule - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null - - name: "Show GitHub package list" - shell: bash - run: | - export BUILD_REASON=Schedule - cat /etc/apt/sources.list.d/* - - name: "Update APT again" - shell: bash - run: | - export BUILD_REASON=Schedule - apt update - - name: "Install GH CLI" - shell: bash - run: | - export BUILD_REASON=Schedule - apt install -y gh - name: "Ensure /run/sshd exists" shell: bash run: | @@ -90,16 +60,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_debian10.3_tag.yml b/.github/workflows/gen_debian10.3_tag.yml index f6ba16f3c..e76de7468 100644 --- a/.github/workflows/gen_debian10.3_tag.yml +++ b/.github/workflows/gen_debian10.3_tag.yml @@ -25,24 +25,6 @@ jobs: - name: "Update APT" shell: bash run: "apt update" - - name: "Install https support for apt" - shell: bash - run: "apt-get install -y apt-transport-https ca-certificates" - - name: "Install GitHub keyring" - shell: bash - run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" - - name: "Add GitHub package list" - shell: bash - run: 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null' - - name: "Show GitHub package list" - shell: bash - run: "cat /etc/apt/sources.list.d/*" - - name: "Update APT again" - shell: bash - run: "apt update" - - name: "Install GH CLI" - shell: bash - run: "apt install -y gh" - name: "Ensure /run/sshd exists" shell: bash run: "mkdir -p /run/sshd" @@ -53,12 +35,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -95,6 +71,17 @@ jobs: path: | wezterm-*.deb wezterm-*.xz + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "debian10.3" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gen_debian11.yml b/.github/workflows/gen_debian11.yml index 642737cc6..be0e98529 100644 --- a/.github/workflows/gen_debian11.yml +++ b/.github/workflows/gen_debian11.yml @@ -34,24 +34,6 @@ jobs: - name: "Update APT" shell: bash run: "apt update" - - name: "Install https support for apt" - shell: bash - run: "apt-get install -y apt-transport-https ca-certificates" - - name: "Install GitHub keyring" - shell: bash - run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" - - name: "Add GitHub package list" - shell: bash - run: 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null' - - name: "Show GitHub package list" - shell: bash - run: "cat /etc/apt/sources.list.d/*" - - name: "Update APT again" - shell: bash - run: "apt update" - - name: "Install GH CLI" - shell: bash - run: "apt install -y gh" - name: "Ensure /run/sshd exists" shell: bash run: "mkdir -p /run/sshd" @@ -62,12 +44,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -100,13 +76,10 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" - - name: "Move Package for artifact upload" - shell: bash - run: | - mkdir pkg_ - mv *.deb *.xz pkg_ - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "debian11" - path: "pkg_" + path: | + wezterm-*.deb + wezterm-*.xz diff --git a/.github/workflows/gen_debian11_continuous.yml b/.github/workflows/gen_debian11_continuous.yml index 298635d74..713e8ceca 100644 --- a/.github/workflows/gen_debian11_continuous.yml +++ b/.github/workflows/gen_debian11_continuous.yml @@ -46,36 +46,6 @@ jobs: run: | export BUILD_REASON=Schedule apt update - - name: "Install https support for apt" - shell: bash - run: | - export BUILD_REASON=Schedule - apt-get install -y apt-transport-https ca-certificates - - name: "Install GitHub keyring" - shell: bash - run: | - export BUILD_REASON=Schedule - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg - - name: "Add GitHub package list" - shell: bash - run: | - export BUILD_REASON=Schedule - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null - - name: "Show GitHub package list" - shell: bash - run: | - export BUILD_REASON=Schedule - cat /etc/apt/sources.list.d/* - - name: "Update APT again" - shell: bash - run: | - export BUILD_REASON=Schedule - apt update - - name: "Install GH CLI" - shell: bash - run: | - export BUILD_REASON=Schedule - apt install -y gh - name: "Ensure /run/sshd exists" shell: bash run: | @@ -90,16 +60,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_debian11_tag.yml b/.github/workflows/gen_debian11_tag.yml index 1e93a79cd..5671de096 100644 --- a/.github/workflows/gen_debian11_tag.yml +++ b/.github/workflows/gen_debian11_tag.yml @@ -25,24 +25,6 @@ jobs: - name: "Update APT" shell: bash run: "apt update" - - name: "Install https support for apt" - shell: bash - run: "apt-get install -y apt-transport-https ca-certificates" - - name: "Install GitHub keyring" - shell: bash - run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" - - name: "Add GitHub package list" - shell: bash - run: 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null' - - name: "Show GitHub package list" - shell: bash - run: "cat /etc/apt/sources.list.d/*" - - name: "Update APT again" - shell: bash - run: "apt update" - - name: "Install GH CLI" - shell: bash - run: "apt install -y gh" - name: "Ensure /run/sshd exists" shell: bash run: "mkdir -p /run/sshd" @@ -53,12 +35,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -95,6 +71,17 @@ jobs: path: | wezterm-*.deb wezterm-*.xz + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "debian11" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gen_debian9.12.yml b/.github/workflows/gen_debian9.12.yml index 3cbc00b4b..5c6a980bc 100644 --- a/.github/workflows/gen_debian9.12.yml +++ b/.github/workflows/gen_debian9.12.yml @@ -48,24 +48,6 @@ jobs: - name: "Update APT" shell: bash run: "apt update" - - name: "Install https support for apt" - shell: bash - run: "apt-get install -y apt-transport-https ca-certificates" - - name: "Install GitHub keyring" - shell: bash - run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" - - name: "Add GitHub package list" - shell: bash - run: 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null' - - name: "Show GitHub package list" - shell: bash - run: "cat /etc/apt/sources.list.d/*" - - name: "Update APT again" - shell: bash - run: "apt update" - - name: "Install GH CLI" - shell: bash - run: "apt install -y gh" - name: "Ensure /run/sshd exists" shell: bash run: "mkdir -p /run/sshd" @@ -76,12 +58,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -114,13 +90,10 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" - - name: "Move Package for artifact upload" - shell: bash - run: | - mkdir pkg_ - mv *.deb *.xz pkg_ - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "debian9.12" - path: "pkg_" + path: | + wezterm-*.deb + wezterm-*.xz diff --git a/.github/workflows/gen_debian9.12_continuous.yml b/.github/workflows/gen_debian9.12_continuous.yml index 6c7fbfce1..906b94280 100644 --- a/.github/workflows/gen_debian9.12_continuous.yml +++ b/.github/workflows/gen_debian9.12_continuous.yml @@ -59,36 +59,6 @@ jobs: run: | export BUILD_REASON=Schedule apt update - - name: "Install https support for apt" - shell: bash - run: | - export BUILD_REASON=Schedule - apt-get install -y apt-transport-https ca-certificates - - name: "Install GitHub keyring" - shell: bash - run: | - export BUILD_REASON=Schedule - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg - - name: "Add GitHub package list" - shell: bash - run: | - export BUILD_REASON=Schedule - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null - - name: "Show GitHub package list" - shell: bash - run: | - export BUILD_REASON=Schedule - cat /etc/apt/sources.list.d/* - - name: "Update APT again" - shell: bash - run: | - export BUILD_REASON=Schedule - apt update - - name: "Install GH CLI" - shell: bash - run: | - export BUILD_REASON=Schedule - apt install -y gh - name: "Ensure /run/sshd exists" shell: bash run: | @@ -103,16 +73,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_debian9.12_tag.yml b/.github/workflows/gen_debian9.12_tag.yml index 49c84db43..7e2f7575f 100644 --- a/.github/workflows/gen_debian9.12_tag.yml +++ b/.github/workflows/gen_debian9.12_tag.yml @@ -39,24 +39,6 @@ jobs: - name: "Update APT" shell: bash run: "apt update" - - name: "Install https support for apt" - shell: bash - run: "apt-get install -y apt-transport-https ca-certificates" - - name: "Install GitHub keyring" - shell: bash - run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" - - name: "Add GitHub package list" - shell: bash - run: 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null' - - name: "Show GitHub package list" - shell: bash - run: "cat /etc/apt/sources.list.d/*" - - name: "Update APT again" - shell: bash - run: "apt update" - - name: "Install GH CLI" - shell: bash - run: "apt install -y gh" - name: "Ensure /run/sshd exists" shell: bash run: "mkdir -p /run/sshd" @@ -67,12 +49,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -109,6 +85,17 @@ jobs: path: | wezterm-*.deb wezterm-*.xz + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "debian9.12" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gen_fedora33.yml b/.github/workflows/gen_fedora33.yml index dc9e6f88d..063beb222 100644 --- a/.github/workflows/gen_fedora33.yml +++ b/.github/workflows/gen_fedora33.yml @@ -22,12 +22,6 @@ jobs: - name: "Install config manager" shell: bash run: "dnf install -y 'dnf-command(config-manager)'" - - name: "Enable GH CLI repo" - shell: bash - run: "dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo" - - name: "Install GH CLI" - shell: bash - run: "dnf install -y gh" - name: "Install git" shell: bash run: "yum install -y git" @@ -44,12 +38,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -82,13 +70,11 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" - - name: "Move Package for artifact upload" + - name: "Move RPM" shell: bash - run: | - mkdir pkg_ - mv ~/rpmbuild/RPMS/*/*.rpm pkg_ + run: "mv ~/rpmbuild/RPMS/*/*.rpm ." - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "fedora33" - path: "pkg_" + path: "wezterm-*.rpm" diff --git a/.github/workflows/gen_fedora33_continuous.yml b/.github/workflows/gen_fedora33_continuous.yml index ec219f386..36059821f 100644 --- a/.github/workflows/gen_fedora33_continuous.yml +++ b/.github/workflows/gen_fedora33_continuous.yml @@ -26,16 +26,6 @@ jobs: run: | export BUILD_REASON=Schedule dnf install -y 'dnf-command(config-manager)' - - name: "Enable GH CLI repo" - shell: bash - run: | - export BUILD_REASON=Schedule - dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo - - name: "Install GH CLI" - shell: bash - run: | - export BUILD_REASON=Schedule - dnf install -y gh - name: "Install git" shell: bash run: | @@ -60,16 +50,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_fedora33_tag.yml b/.github/workflows/gen_fedora33_tag.yml index cbc6e5198..b7b9dbb6d 100644 --- a/.github/workflows/gen_fedora33_tag.yml +++ b/.github/workflows/gen_fedora33_tag.yml @@ -13,12 +13,6 @@ jobs: - name: "Install config manager" shell: bash run: "dnf install -y 'dnf-command(config-manager)'" - - name: "Enable GH CLI repo" - shell: bash - run: "dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo" - - name: "Install GH CLI" - shell: bash - run: "dnf install -y gh" - name: "Install git" shell: bash run: "yum install -y git" @@ -35,12 +29,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -78,6 +66,17 @@ jobs: with: name: "fedora33" path: "wezterm-*.rpm" + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "fedora33" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gen_fedora34.yml b/.github/workflows/gen_fedora34.yml index a9c2a5969..931005878 100644 --- a/.github/workflows/gen_fedora34.yml +++ b/.github/workflows/gen_fedora34.yml @@ -22,12 +22,6 @@ jobs: - name: "Install config manager" shell: bash run: "dnf install -y 'dnf-command(config-manager)'" - - name: "Enable GH CLI repo" - shell: bash - run: "dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo" - - name: "Install GH CLI" - shell: bash - run: "dnf install -y gh" - name: "Install git" shell: bash run: "yum install -y git" @@ -44,12 +38,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -82,13 +70,11 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" - - name: "Move Package for artifact upload" + - name: "Move RPM" shell: bash - run: | - mkdir pkg_ - mv ~/rpmbuild/RPMS/*/*.rpm pkg_ + run: "mv ~/rpmbuild/RPMS/*/*.rpm ." - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "fedora34" - path: "pkg_" + path: "wezterm-*.rpm" diff --git a/.github/workflows/gen_fedora34_continuous.yml b/.github/workflows/gen_fedora34_continuous.yml index 36dc6a283..6dbad0821 100644 --- a/.github/workflows/gen_fedora34_continuous.yml +++ b/.github/workflows/gen_fedora34_continuous.yml @@ -26,16 +26,6 @@ jobs: run: | export BUILD_REASON=Schedule dnf install -y 'dnf-command(config-manager)' - - name: "Enable GH CLI repo" - shell: bash - run: | - export BUILD_REASON=Schedule - dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo - - name: "Install GH CLI" - shell: bash - run: | - export BUILD_REASON=Schedule - dnf install -y gh - name: "Install git" shell: bash run: | @@ -60,16 +50,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_fedora34_tag.yml b/.github/workflows/gen_fedora34_tag.yml index 60d197fc1..fb87321f7 100644 --- a/.github/workflows/gen_fedora34_tag.yml +++ b/.github/workflows/gen_fedora34_tag.yml @@ -13,12 +13,6 @@ jobs: - name: "Install config manager" shell: bash run: "dnf install -y 'dnf-command(config-manager)'" - - name: "Enable GH CLI repo" - shell: bash - run: "dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo" - - name: "Install GH CLI" - shell: bash - run: "dnf install -y gh" - name: "Install git" shell: bash run: "yum install -y git" @@ -35,12 +29,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -78,6 +66,17 @@ jobs: with: name: "fedora34" path: "wezterm-*.rpm" + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "fedora34" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gen_fedora35.yml b/.github/workflows/gen_fedora35.yml index 92aeb608f..93f8e628a 100644 --- a/.github/workflows/gen_fedora35.yml +++ b/.github/workflows/gen_fedora35.yml @@ -22,12 +22,6 @@ jobs: - name: "Install config manager" shell: bash run: "dnf install -y 'dnf-command(config-manager)'" - - name: "Enable GH CLI repo" - shell: bash - run: "dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo" - - name: "Install GH CLI" - shell: bash - run: "dnf install -y gh" - name: "Install git" shell: bash run: "yum install -y git" @@ -44,12 +38,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -82,13 +70,11 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" - - name: "Move Package for artifact upload" + - name: "Move RPM" shell: bash - run: | - mkdir pkg_ - mv ~/rpmbuild/RPMS/*/*.rpm pkg_ + run: "mv ~/rpmbuild/RPMS/*/*.rpm ." - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "fedora35" - path: "pkg_" + path: "wezterm-*.rpm" diff --git a/.github/workflows/gen_fedora35_continuous.yml b/.github/workflows/gen_fedora35_continuous.yml index 792be18e6..b2269b5ac 100644 --- a/.github/workflows/gen_fedora35_continuous.yml +++ b/.github/workflows/gen_fedora35_continuous.yml @@ -26,16 +26,6 @@ jobs: run: | export BUILD_REASON=Schedule dnf install -y 'dnf-command(config-manager)' - - name: "Enable GH CLI repo" - shell: bash - run: | - export BUILD_REASON=Schedule - dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo - - name: "Install GH CLI" - shell: bash - run: | - export BUILD_REASON=Schedule - dnf install -y gh - name: "Install git" shell: bash run: | @@ -60,16 +50,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_fedora35_tag.yml b/.github/workflows/gen_fedora35_tag.yml index 583408cf0..14c04aa3c 100644 --- a/.github/workflows/gen_fedora35_tag.yml +++ b/.github/workflows/gen_fedora35_tag.yml @@ -13,12 +13,6 @@ jobs: - name: "Install config manager" shell: bash run: "dnf install -y 'dnf-command(config-manager)'" - - name: "Enable GH CLI repo" - shell: bash - run: "dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo" - - name: "Install GH CLI" - shell: bash - run: "dnf install -y gh" - name: "Install git" shell: bash run: "yum install -y git" @@ -35,12 +29,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -78,6 +66,17 @@ jobs: with: name: "fedora35" path: "wezterm-*.rpm" + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "fedora35" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gen_macos.yml b/.github/workflows/gen_macos.yml index 13dd3817e..3110b2233 100644 --- a/.github/workflows/gen_macos.yml +++ b/.github/workflows/gen_macos.yml @@ -23,16 +23,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export MACOSX_DEPLOYMENT_TARGET=10.9 - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export MACOSX_DEPLOYMENT_TARGET=10.9 - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -77,15 +67,8 @@ jobs: run: | export MACOSX_DEPLOYMENT_TARGET=10.9 bash ci/deploy.sh - - name: "Move Package for artifact upload" - shell: bash - run: | - export MACOSX_DEPLOYMENT_TARGET=10.9 - mkdir pkg_ - mv *.zip pkg_ - - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "macos" - path: "pkg_" + path: "WezTerm-*.zip" diff --git a/.github/workflows/gen_macos_continuous.yml b/.github/workflows/gen_macos_continuous.yml index 9991ec2a8..d1d990292 100644 --- a/.github/workflows/gen_macos_continuous.yml +++ b/.github/workflows/gen_macos_continuous.yml @@ -25,20 +25,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - export MACOSX_DEPLOYMENT_TARGET=10.9 - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - export MACOSX_DEPLOYMENT_TARGET=10.9 - git fetch --prune --unshallow - - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_macos_tag.yml b/.github/workflows/gen_macos_tag.yml index f3c8fb4ab..cb0765958 100644 --- a/.github/workflows/gen_macos_tag.yml +++ b/.github/workflows/gen_macos_tag.yml @@ -14,16 +14,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export MACOSX_DEPLOYMENT_TARGET=10.9 - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export MACOSX_DEPLOYMENT_TARGET=10.9 - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -74,20 +64,6 @@ jobs: with: name: "macos" path: "WezTerm-*.zip" - - name: "Create pre-release" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - export MACOSX_DEPLOYMENT_TARGET=10.9 - bash ci/retry.sh bash ci/create-release.sh ${{ github.event.release.tag_name }} - - name: "Upload to Tagged Release" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - export MACOSX_DEPLOYMENT_TARGET=10.9 - bash ci/retry.sh gh release upload --clobber ${ github.event.release.tag_name } WezTerm-*.zip - name: "Checkout homebrew tap" uses: actions/checkout@v2 with: @@ -104,3 +80,24 @@ jobs: with: commit_message: "Automated update to match latest tag" repository: "homebrew-wezterm" + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "macos" + - name: "Create pre-release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh bash ci/create-release.sh ${{ github.event.release.tag_name }}" + - name: "Upload to Tagged Release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh gh release upload --clobber ${ github.event.release.tag_name } WezTerm-*.zip" diff --git a/.github/workflows/gen_ubuntu18.yml b/.github/workflows/gen_ubuntu18.yml index ea66ccfa3..35ebb7d17 100644 --- a/.github/workflows/gen_ubuntu18.yml +++ b/.github/workflows/gen_ubuntu18.yml @@ -29,12 +29,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -73,14 +67,13 @@ jobs: - name: "Build AppImage" shell: bash run: "bash ci/appimage.sh" - - name: "Move Package for artifact upload" - shell: bash - run: | - mkdir pkg_ - mv *.deb *.xz pkg_ - mv *.AppImage *.zsync pkg_ - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "ubuntu18" - path: "pkg_" + path: | + wezterm-*.deb + wezterm-*.xz + *src.tar.gz + *.AppImage + *.zsync diff --git a/.github/workflows/gen_ubuntu18_continuous.yml b/.github/workflows/gen_ubuntu18_continuous.yml index 2e4ca1416..a2f5795b0 100644 --- a/.github/workflows/gen_ubuntu18_continuous.yml +++ b/.github/workflows/gen_ubuntu18_continuous.yml @@ -35,16 +35,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_ubuntu18_tag.yml b/.github/workflows/gen_ubuntu18_tag.yml index e9ad8650c..cc27dce16 100644 --- a/.github/workflows/gen_ubuntu18_tag.yml +++ b/.github/workflows/gen_ubuntu18_tag.yml @@ -20,12 +20,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -71,16 +65,6 @@ jobs: *src.tar.gz *.AppImage *.zsync - - name: "Create pre-release" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: "bash ci/retry.sh bash ci/create-release.sh ${{ github.event.release.tag_name }}" - - name: "Upload to Tagged Release" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: "bash ci/retry.sh gh release upload --clobber ${ github.event.release.tag_name } wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage *.zsync" - name: "Checkout linuxbrew tap" uses: actions/checkout@v2 with: @@ -95,3 +79,24 @@ jobs: with: commit_message: "Automated update to match latest tag" repository: "linuxbrew-wezterm" + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "ubuntu18" + - name: "Create pre-release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh bash ci/create-release.sh ${{ github.event.release.tag_name }}" + - name: "Upload to Tagged Release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh gh release upload --clobber ${ github.event.release.tag_name } wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage *.zsync" diff --git a/.github/workflows/gen_ubuntu20.04.yml b/.github/workflows/gen_ubuntu20.04.yml index 671a429fe..007c65ff2 100644 --- a/.github/workflows/gen_ubuntu20.04.yml +++ b/.github/workflows/gen_ubuntu20.04.yml @@ -34,24 +34,6 @@ jobs: - name: "Update APT" shell: bash run: "apt update" - - name: "Install https support for apt" - shell: bash - run: "apt-get install -y apt-transport-https ca-certificates" - - name: "Install GitHub keyring" - shell: bash - run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" - - name: "Add GitHub package list" - shell: bash - run: 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null' - - name: "Show GitHub package list" - shell: bash - run: "cat /etc/apt/sources.list.d/*" - - name: "Update APT again" - shell: bash - run: "apt update" - - name: "Install GH CLI" - shell: bash - run: "apt install -y gh" - name: "Ensure /run/sshd exists" shell: bash run: "mkdir -p /run/sshd" @@ -62,12 +44,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -100,13 +76,10 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" - - name: "Move Package for artifact upload" - shell: bash - run: | - mkdir pkg_ - mv *.deb *.xz pkg_ - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "ubuntu20.04" - path: "pkg_" + path: | + wezterm-*.deb + wezterm-*.xz diff --git a/.github/workflows/gen_ubuntu20.04_continuous.yml b/.github/workflows/gen_ubuntu20.04_continuous.yml index 2ee36405f..2a30babce 100644 --- a/.github/workflows/gen_ubuntu20.04_continuous.yml +++ b/.github/workflows/gen_ubuntu20.04_continuous.yml @@ -46,36 +46,6 @@ jobs: run: | export BUILD_REASON=Schedule apt update - - name: "Install https support for apt" - shell: bash - run: | - export BUILD_REASON=Schedule - apt-get install -y apt-transport-https ca-certificates - - name: "Install GitHub keyring" - shell: bash - run: | - export BUILD_REASON=Schedule - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg - - name: "Add GitHub package list" - shell: bash - run: | - export BUILD_REASON=Schedule - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null - - name: "Show GitHub package list" - shell: bash - run: | - export BUILD_REASON=Schedule - cat /etc/apt/sources.list.d/* - - name: "Update APT again" - shell: bash - run: | - export BUILD_REASON=Schedule - apt update - - name: "Install GH CLI" - shell: bash - run: | - export BUILD_REASON=Schedule - apt install -y gh - name: "Ensure /run/sshd exists" shell: bash run: | @@ -90,16 +60,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_ubuntu20.04_tag.yml b/.github/workflows/gen_ubuntu20.04_tag.yml index 623a4ac3c..180cc0257 100644 --- a/.github/workflows/gen_ubuntu20.04_tag.yml +++ b/.github/workflows/gen_ubuntu20.04_tag.yml @@ -25,24 +25,6 @@ jobs: - name: "Update APT" shell: bash run: "apt update" - - name: "Install https support for apt" - shell: bash - run: "apt-get install -y apt-transport-https ca-certificates" - - name: "Install GitHub keyring" - shell: bash - run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" - - name: "Add GitHub package list" - shell: bash - run: 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null' - - name: "Show GitHub package list" - shell: bash - run: "cat /etc/apt/sources.list.d/*" - - name: "Update APT again" - shell: bash - run: "apt update" - - name: "Install GH CLI" - shell: bash - run: "apt install -y gh" - name: "Ensure /run/sshd exists" shell: bash run: "mkdir -p /run/sshd" @@ -53,12 +35,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -95,6 +71,17 @@ jobs: path: | wezterm-*.deb wezterm-*.xz + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "ubuntu20.04" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gen_windows.yml b/.github/workflows/gen_windows.yml index 4bcc35414..27eeea9b7 100644 --- a/.github/workflows/gen_windows.yml +++ b/.github/workflows/gen_windows.yml @@ -23,12 +23,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -62,13 +56,10 @@ jobs: - name: "Package" shell: bash run: "bash ci/deploy.sh" - - name: "Move Package for artifact upload" - shell: bash - run: | - mkdir pkg_ - mv *.zip *.exe pkg_ - name: "Upload artifact" uses: actions/upload-artifact@v2 with: name: "windows" - path: "pkg_" + path: | + WezTerm-*.zip + WezTerm-*.exe diff --git a/.github/workflows/gen_windows_continuous.yml b/.github/workflows/gen_windows_continuous.yml index d79f4dd29..1f3624aab 100644 --- a/.github/workflows/gen_windows_continuous.yml +++ b/.github/workflows/gen_windows_continuous.yml @@ -25,16 +25,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: "Fetch tag/branch history" - shell: bash - run: | - export BUILD_REASON=Schedule - git fetch --prune --unshallow - name: "Install Rust" uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/gen_windows_tag.yml b/.github/workflows/gen_windows_tag.yml index a245dfd8e..6e14a4498 100644 --- a/.github/workflows/gen_windows_tag.yml +++ b/.github/workflows/gen_windows_tag.yml @@ -14,12 +14,6 @@ jobs: uses: actions/checkout@v2 with: submodules: "recursive" - - name: "Fetch tags" - shell: bash - run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - - name: "Fetch tag/branch history" - shell: bash - run: "git fetch --prune --unshallow" - name: "Install Rust" uses: actions-rs/toolchain@v1 with: @@ -57,6 +51,17 @@ jobs: path: | WezTerm-*.zip WezTerm-*.exe + + upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: "checkout repo" + uses: actions/checkout@v2 + - name: "Download artifact" + uses: actions/download-artifact@v2 + with: + name: "windows" - name: "Create pre-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/ci/generate-workflows.py b/ci/generate-workflows.py index 24a3ce422..71654a0bb 100755 --- a/ci/generate-workflows.py +++ b/ci/generate-workflows.py @@ -348,24 +348,25 @@ cargo build --all --release""", return steps def upload_artifact(self): - run = "mkdir pkg_\n" - if self.uses_yum(): - run += "mv ~/rpmbuild/RPMS/*/*.rpm pkg_\n" - if "win" in self.name: - run += "mv *.zip *.exe pkg_\n" - if "mac" in self.name: - run += "mv *.zip pkg_\n" - if ("ubuntu" in self.name) or ("debian" in self.name): - run += "mv *.deb *.xz pkg_\n" - if self.app_image: - run += "mv *.AppImage *.zsync pkg_\n" + steps = [] - return [ - RunStep("Move Package for artifact upload", run), + if self.uses_yum(): + steps.append( + RunStep( + "Move RPM", + f"mv ~/rpmbuild/RPMS/*/*.rpm .", + ) + ) + + patterns = self.asset_patterns() + glob = " ".join(patterns) + paths = "\n".join(patterns) + + return steps + [ ActionStep( "Upload artifact", action="actions/upload-artifact@v2", - params={"name": self.name, "path": "pkg_"}, + params={"name": self.name, "path": paths}, ), ] @@ -431,18 +432,14 @@ cargo build --all --release""", def upload_asset_tag(self): steps = [] - if self.uses_yum(): - steps.append(RunStep("Move RPM", "mv ~/rpmbuild/RPMS/*/*.rpm .")) - patterns = self.asset_patterns() glob = " ".join(patterns) - paths = "\n".join(patterns) return steps + [ ActionStep( - "Upload artifact", - action="actions/upload-artifact@v2", - params={"name": self.name, "path": paths}, + "Download artifact", + action="actions/download-artifact@v2", + params={"name": self.name}, ), RunStep( "Create pre-release", @@ -545,17 +542,6 @@ cargo build --all --release""", "dnf config-manager --set-enabled powertools", ), ] - if ("fedora" in self.container) or ("centos" in self.container): - steps += [ - RunStep( - "Enable GH CLI repo", - "dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo", - ), - RunStep( - "Install GH CLI", - "dnf install -y gh", - ), - ] steps += self.install_newer_compiler() steps += self.install_git() steps += self.install_curl() @@ -564,34 +550,11 @@ cargo build --all --release""", if self.container: steps += [ RunStep("Update APT", f"{sudo}apt update"), - RunStep( - "Install https support for apt", - f"{sudo}apt-get install -y apt-transport-https ca-certificates", - ), - RunStep( - "Install GitHub keyring", - f"curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | {sudo}dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg", - ), - RunStep( - "Add GitHub package list", - f'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | {sudo}tee /etc/apt/sources.list.d/github-cli.list > /dev/null', - ), - RunStep( - "Show GitHub package list", - "cat /etc/apt/sources.list.d/*", - ), - RunStep("Update APT again", f"{sudo}apt update"), - RunStep("Install GH CLI", f"{sudo}apt install -y gh"), ] steps += self.install_openssh_server() steps += [ CheckoutStep(), - # We need tags in order to use git describe for build/packaging - RunStep( - "Fetch tags", "git fetch --depth=1 origin +refs/tags/*:refs/tags/*" - ), - RunStep("Fetch tag/branch history", "git fetch --prune --unshallow"), ] steps += self.install_rust(cache="mac" not in self.name) steps += self.install_system_deps() @@ -644,9 +607,14 @@ cargo build --all --release""", steps += self.build_all_release() steps += self.test_all_release() steps += self.package(trusted=True) - steps += self.upload_asset_tag() + steps += self.upload_artifact() steps += self.update_homebrew_tap() + uploader = Job( + runs_on="ubuntu-latest", + steps=[CheckoutStep(submodules=False)] + self.upload_asset_tag(), + ) + env = self.global_env() return ( Job( @@ -655,7 +623,7 @@ cargo build --all --release""", steps=steps, env=env, ), - None, + uploader, ) @@ -705,6 +673,10 @@ jobs: job.render(f, 3) + # We upload using a native runner as github API access + # inside a container is really unreliable and can result + # in broken releases that can't automatically be repaired + # if uploader: f.write( """