build-macos-release #1
Workflow file for this run
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
# Build a macos release from the avalanchego repo | |
name: build-macos-release | |
# Controls when the action will run. | |
on: | |
push: | |
tags: | |
- '*' # Push events to every tag | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build-mac: | |
# The type of runner that the job will run on | |
runs-on: macos-10.15 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.15.5' # The Go version to download (if necessary) and use. | |
- run: go version | |
# Runs a single command using the runners shell | |
- name: Build the avalanchego binaries | |
run: ./scripts/build.sh | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
shell: bash | |
- name: Install aws cli | |
run: | | |
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" | |
sudo installer -pkg AWSCLIV2.pkg -target / | |
- name: Create zip file | |
run: 7z a avalanchego-macos-${{ steps.get_version.outputs.VERSION }}.zip build/avalanchego build/plugins | |
- name: Upload file to S3 | |
run: aws s3 cp avalanchego-macos-${{ steps.get_version.outputs.VERSION }}.zip s3://${{ secrets.BUCKET }}/macos/ | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.UPLOAD_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.UPLOAD_KEY }} | |
BUCKET: ${{ secrets.BUCKET }} |