Skip to content

Update versions for v1.11.12 (#3470) #537

Update versions for v1.11.12 (#3470)

Update versions for v1.11.12 (#3470) #537

# Build a windows release from the avalanchego repo
name: build-win-release
# Controls when the action will run.
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to include in artifact name'
required: true
push:
tags:
- "*"
# 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-win:
# The type of runner that the job will run on
runs-on: windows-2019
permissions:
id-token: write
contents: read
# 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@v4
- uses: ./.github/actions/setup-go-for-project
- run: go version
- name: Install awscli
run: |
msiexec.exe /passive /i /n https://awscli.amazonaws.com/AWSCLIV2.msi
aws --version
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_DEPLOY_SA_ROLE_ARN }}
role-session-name: githubrolesession
aws-region: us-east-1
- name: Try to get tag from git
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash
- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash
# Runs a single command using the runners shell
- name: Build the avalanchego binary
run: ./scripts/build.sh
shell: bash
- name: Create zip
run: |
mv .\build\avalanchego .\build\avalanchego.exe
Compress-Archive -Path .\build\avalanchego.exe -DestinationPath .\build\avalanchego-win-${{ env.TAG }}-experimental.zip
- name: Copy to s3
run: aws s3 cp .\build\avalanchego-win-${{ env.TAG }}-experimental.zip s3://${{ secrets.BUCKET }}/windows/avalanchego-win-${{ env.TAG }}-experimental.zip
- name: Save as Github artifact
uses: actions/upload-artifact@v4
with:
name: build
path: .\build\avalanchego-win-${{ env.TAG }}-experimental.zip