From 0a83a9c52bb64f31ee817b6db402245b9384fdcc Mon Sep 17 00:00:00 2001 From: Stephen Buttolph Date: Thu, 19 Sep 2024 12:03:58 -0400 Subject: [PATCH] build noble amd64 debs --- .../workflows/build-ubuntu-amd64-release.yml | 66 +++++++++++++++++-- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-ubuntu-amd64-release.yml b/.github/workflows/build-ubuntu-amd64-release.yml index 30c546fa108a..e38fee1d8aa9 100644 --- a/.github/workflows/build-ubuntu-amd64-release.yml +++ b/.github/workflows/build-ubuntu-amd64-release.yml @@ -11,6 +11,64 @@ on: - "*" jobs: + build-focal-amd64-package: + runs-on: ubuntu-20.04 + permissions: + id-token: write + contents: read + + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-go-for-project + - run: go version + + - name: Build the avalanchego binaries + run: ./scripts/build.sh + + - name: Install aws cli + run: sudo snap install aws-cli --classic + + - 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: + role-to-assume: ${{ secrets.AWS_DEPLOY_SA_ROLE_ARN }} + role-session-name: githubrolesession + 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 + build-jammy-amd64-package: runs-on: ubuntu-22.04 permissions: @@ -69,8 +127,8 @@ jobs: rm -rf ./build rm -rf /tmp/avalanchego - build-focal-amd64-package: - runs-on: ubuntu-20.04 + build-noble-amd64-package: + runs-on: ubuntu-24.04 permissions: id-token: write contents: read @@ -114,12 +172,12 @@ jobs: TAG: ${{ env.TAG }} BUCKET: ${{ secrets.BUCKET }} ARCH: "amd64" - RELEASE: "focal" + RELEASE: "noble" - name: Save as Github artifact uses: actions/upload-artifact@v4 with: - name: focal + name: noble path: /tmp/avalanchego/avalanchego-${{ env.TAG }}-amd64.deb - name: Cleanup