ci: drop macOS build and Homebrew tap, keep Linux + .deb + APT only
Some checks failed
Release / release (push) Failing after 1m11s
Some checks failed
Release / release (push) Failing after 1m11s
This commit is contained in:
parent
e831dd1eb1
commit
0a89020ce1
1 changed files with 1 additions and 87 deletions
|
|
@ -17,17 +17,9 @@ jobs:
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y dpkg-dev git curl openssh-client xz-utils
|
apt-get install -y dpkg-dev git curl openssh-client
|
||||||
cargo install cargo-deb
|
cargo install cargo-deb
|
||||||
|
|
||||||
- name: Install zig
|
|
||||||
run: |
|
|
||||||
curl -fsSL https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz -o /tmp/zig.tar.xz
|
|
||||||
mkdir -p /usr/local/zig
|
|
||||||
tar -xJf /tmp/zig.tar.xz -C /usr/local/zig --strip-components=1
|
|
||||||
ln -sf /usr/local/zig/zig /usr/local/bin/zig
|
|
||||||
zig version
|
|
||||||
|
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
run: |
|
run: |
|
||||||
test -r /keys/forgejo_runner || { echo "Deploy key /keys/forgejo_runner chybi"; exit 1; }
|
test -r /keys/forgejo_runner || { echo "Deploy key /keys/forgejo_runner chybi"; exit 1; }
|
||||||
|
|
@ -55,29 +47,6 @@ jobs:
|
||||||
tar -czf "dist/resticview-${VERSION}-linux-amd64.tar.gz" -C "${STAGING}" resticview
|
tar -czf "dist/resticview-${VERSION}-linux-amd64.tar.gz" -C "${STAGING}" resticview
|
||||||
rm -rf "${STAGING}"
|
rm -rf "${STAGING}"
|
||||||
|
|
||||||
- name: Build macOS release binaries
|
|
||||||
id: macos
|
|
||||||
continue-on-error: true
|
|
||||||
working-directory: src
|
|
||||||
run: |
|
|
||||||
VERSION=${{ github.ref_name }}
|
|
||||||
|
|
||||||
rustup target add x86_64-apple-darwin aarch64-apple-darwin
|
|
||||||
cargo install cargo-zigbuild
|
|
||||||
cargo zigbuild --release --target x86_64-apple-darwin
|
|
||||||
cargo zigbuild --release --target aarch64-apple-darwin
|
|
||||||
|
|
||||||
for arch in x86_64 aarch64; do
|
|
||||||
STAGING=$(mktemp -d)
|
|
||||||
cp "target/${arch}-apple-darwin/release/resticview" "${STAGING}/resticview"
|
|
||||||
case "$arch" in
|
|
||||||
x86_64) out_arch=amd64 ;;
|
|
||||||
aarch64) out_arch=arm64 ;;
|
|
||||||
esac
|
|
||||||
tar -czf "dist/resticview-${VERSION}-darwin-${out_arch}.tar.gz" -C "${STAGING}" resticview
|
|
||||||
rm -rf "${STAGING}"
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Print checksums
|
- name: Print checksums
|
||||||
working-directory: src
|
working-directory: src
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -130,61 +99,6 @@ jobs:
|
||||||
echo "Uploaded ${NAME}"
|
echo "Uploaded ${NAME}"
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Update Homebrew tap
|
|
||||||
if: steps.macos.outcome == 'success'
|
|
||||||
working-directory: src
|
|
||||||
run: |
|
|
||||||
VERSION=${{ github.ref_name }}
|
|
||||||
VER=${VERSION#v}
|
|
||||||
|
|
||||||
SHA_DARWIN_ARM64=$(sha256sum dist/resticview-${VERSION}-darwin-arm64.tar.gz | awk '{print $1}')
|
|
||||||
SHA_DARWIN_AMD64=$(sha256sum dist/resticview-${VERSION}-darwin-amd64.tar.gz | awk '{print $1}')
|
|
||||||
SHA_LINUX=$(sha256sum dist/resticview-${VERSION}-linux-amd64.tar.gz | awk '{print $1}')
|
|
||||||
|
|
||||||
git clone ssh://git@git-ssh.janvete.com:554/seth/homebrew-tools.git tap
|
|
||||||
|
|
||||||
cat > tap/Formula/resticview.rb << FORMULA
|
|
||||||
class Resticview < Formula
|
|
||||||
desc "TUI browser for restic backup repositories"
|
|
||||||
homepage "https://git.janvete.com/seth/resticview"
|
|
||||||
version "${VER}"
|
|
||||||
license "MIT"
|
|
||||||
head "https://git.janvete.com/seth/resticview.git", branch: "main"
|
|
||||||
|
|
||||||
on_macos do
|
|
||||||
if Hardware::CPU.arm?
|
|
||||||
url "https://git.janvete.com/seth/resticview/releases/download/${VERSION}/resticview-${VERSION}-darwin-arm64.tar.gz"
|
|
||||||
sha256 "${SHA_DARWIN_ARM64}"
|
|
||||||
else
|
|
||||||
url "https://git.janvete.com/seth/resticview/releases/download/${VERSION}/resticview-${VERSION}-darwin-amd64.tar.gz"
|
|
||||||
sha256 "${SHA_DARWIN_AMD64}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
on_linux do
|
|
||||||
if Hardware::CPU.intel?
|
|
||||||
url "https://git.janvete.com/seth/resticview/releases/download/${VERSION}/resticview-${VERSION}-linux-amd64.tar.gz"
|
|
||||||
sha256 "${SHA_LINUX}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def install
|
|
||||||
bin.install "resticview"
|
|
||||||
end
|
|
||||||
|
|
||||||
test do
|
|
||||||
assert_match "TUI browser for restic backup repositories", shell_output("#{bin}/resticview --help")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
FORMULA
|
|
||||||
|
|
||||||
cd tap
|
|
||||||
git config user.email "forgejo-actions[bot]@janvete.com"
|
|
||||||
git config user.name "forgejo-actions[bot]"
|
|
||||||
git add Formula/resticview.rb
|
|
||||||
git commit -m "chore: bump resticview to ${VERSION}"
|
|
||||||
git push
|
|
||||||
|
|
||||||
- name: Update APT repository
|
- name: Update APT repository
|
||||||
working-directory: src
|
working-directory: src
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue