fix: install make (#260) #169
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] }} | |
container: ${{ fromJson('{"amd64":"docker.io/rockylinux:8", "arm64":"docker.io/rockylinux:8"}')[matrix.arch] }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.20.x | |
- name: Prepare tools | |
run: | | |
dnf install -y make python3 | |
- name: Build binary and related tools | |
run: make build | |
- name: Configure awscli | |
run: | | |
pip3 install awscli | |
printf "%s\n" ${{ secrets.AWS_ACCESS_KEY }} ${{ secrets.AWS_SECRET_KEY }} ${{ secrets.AWS_REGION }} "json" | aws configure | |
# 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 |