Skip to content

Merge branch 'master' into validator-rankings #411

Merge branch 'master' into validator-rankings

Merge branch 'master' into validator-rankings #411

name: build-amd64-debian-packages
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to include in artifact name'
required: true
push:
tags:
- "*"
env:
go_version: '~1.21.8'
jobs:
build-jammy-amd64-package:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
check-latest: true
- run: go version
- name: Build the avalanchego binaries
run: ./scripts/build.sh
- name: Install aws cli
run: |
sudo apt update
sudo apt -y install awscli
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
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
- name: Create debian package
run: ./.github/workflows/build-deb-pkg.sh
env:
PKG_ROOT: /tmp/avalanchego
TAG: ${{ env.TAG }}
BUCKET: ${{ secrets.BUCKET }}
ARCH: "amd64"
RELEASE: "jammy"
- name: Save as Github artifact
uses: actions/upload-artifact@v4
with:
name: jammy
path: /tmp/avalanchego/avalanchego-${{ env.TAG }}-amd64.deb
- name: Cleanup
run: |
rm -rf ./build
rm -rf /tmp/avalanchego
build-focal-amd64-package:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
check-latest: true
- run: go version
- name: Build the avalanchego binaries
run: ./scripts/build.sh
- name: Install aws cli
run: |
sudo apt update
sudo apt -y install awscli
- 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
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Create debian package
run: ./.github/workflows/build-deb-pkg.sh
env:
PKG_ROOT: /tmp/avalanchego
TAG: ${{ env.TAG }}
BUCKET: ${{ secrets.BUCKET }}
ARCH: "amd64"
RELEASE: "focal"
- name: Save as Github artifact
uses: actions/upload-artifact@v4
with:
name: focal
path: /tmp/avalanchego/avalanchego-${{ env.TAG }}-amd64.deb
- name: Cleanup
run: |
rm -rf ./build
rm -rf /tmp/avalanchego