Skip to content

chore: upgrade go (#256) #165

chore: upgrade go (#256)

chore: upgrade go (#256) #165

name: Release latest binary
on:
push:
branches:
- main
jobs:
run:
name: Upload
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
runs-on: ${{ fromJson('{"amd64":"ubuntu-latest", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }}
# glibc version 2.17
container: ${{ fromJson('{"amd64":"docker.io/centos:7.2.1511", "arm64":"docker.io/centos:centos7"}')[matrix.arch] }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: 1.20.x
- name: Setup python3
run: |
yum install -y python3
alias python=python3
- name: Configure awscli
run: |
pip3 install awscli
printf "%s\n" ${{ secrets.AWS_ACCESS_KEY }} ${{ secrets.AWS_SECRET_KEY }} ${{ secrets.AWS_REGION }} "json" | aws configure
- name: Build binary and related tools
run: make build
# TODO: release on github package / release
- name: Upload files
run: |
mv bin chaosd-latest-linux-${{ matrix.arch }}
tar czvf chaosd-latest-linux-${{ matrix.arch }}.tar.gz chaosd-latest-linux-${{ matrix.arch }}
aws s3 cp chaosd-latest-linux-${{ matrix.arch }}.tar.gz ${{ secrets.AWS_BUCKET_NAME }}/chaosd-latest-linux-${{ matrix.arch }}.tar.gz