diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml deleted file mode 100644 index cf47c42..0000000 --- a/.github/workflows/docker-release.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Release -on: - push: - tags: [ "v?[0-9]+.[0-9]+.[0-9]+" ] - -jobs: - build: - runs-on: ubuntu-latest - container: - image: ghcr.io/svishwanath-tw/talisman-build:latest - credentials: - username: svishwanath-tw - password: ${{ secrets.ghcr_token }} - volumes: - - ${{ github.workspace }}:/talisman-src - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Build - run: ./build-release-binaries - - name: Publish binaries to release - uses: fnkr/github-action-ghr@ghr-options - env: - GHR_PATH: dist/ - GHR_DRAFT: yes - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a10906a..0000000 --- a/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM golang:alpine as builder - -RUN apk add --update git perl-utils ca-certificates && \ - update-ca-certificates && \ - mkdir -p /talisman-src && \ - wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz && \ - mkdir -p /opt && \ - tar -xf upx-3.96-amd64_linux.tar.xz -C /opt && \ - git config --global user.name "Talisman Maintainers" && \ - git config --global user.email "talisman-maintainers@thoughtworks.com " - -ENV CGO_ENABLED=0 -ENV PATH="$PATH:/opt/upx-3.96-amd64_linux" - -WORKDIR /talisman-src - -CMD ["build-release-binaries"] diff --git a/build b/build deleted file mode 100755 index 709f6f2..0000000 --- a/build +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -VERSION=$(git describe --tags HEAD) -mkdir -p dist/ - -for OS in linux darwin windows; do - arch_list="amd64" - if [ "${OS}" == "darwin" ]; then - arch_list="arm64 ${arch_list}" - else - arch_list="386 ${arch_list}" - fi - - for ARCH in ${arch_list}; do - [ "${OS}" == "windows" ] && suffix=".exe" || suffix="" - output_filename="dist/talisman_${OS}_${ARCH}${suffix}" - echo "OS:${OS} ARCH:${ARCH}" - GOOS=${OS} GOARCH=${ARCH} go build -o ${output_filename} -ldflags="-s -w -X main.Version=${VERSION}" talisman/cmd - done -done diff --git a/build_binaries.bash b/build_binaries.bash deleted file mode 100755 index 18f8b8e..0000000 --- a/build_binaries.bash +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -docker image build --rm -t build_talisman . -docker container run --rm -v $(pwd):/go/src/github.com/thoughtworks/talisman -it --name build_talisman build_talisman -# need to find a good way to make sure that the binaries and the checksum file are not owned by root -# sudo chown $USER:$USER talisman_{l,d,w}* -# sudo chown $USER:$USER checksums diff --git a/clean b/clean deleted file mode 100755 index a2209ab..0000000 --- a/clean +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -rm -vf dist/checksums dist/talisman_{d,l,w}* diff --git a/compress-binary.sh b/compress-binary.sh deleted file mode 100755 index 5fdc855..0000000 --- a/compress-binary.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -e - -pushd dist || exit - -binary=$1 - -if [[ $binary == *"darwin"* || $binary == *"arm"* ]]; then - exit 0 -fi - -echo "Compressing binaries" -upx --lzma "$binary" -echo "...Done" - -echo "Verifying compressed binaries" -upx -t "$binary" -echo "...Done" - -popd || exit