github.com/MetalBlockchain/metalgo@v1.11.9/.github/workflows/build-ubuntu-arm64-release.yml (about)

     1  name: build-arm64-debian-packages
     2  
     3  on:
     4    workflow_dispatch:
     5      inputs:
     6        tag:
     7          description: 'Tag to include in artifact name'
     8          required: true
     9    push:
    10      tags:
    11        - "*"
    12  
    13  jobs:
    14    build-jammy-arm64-package:
    15      runs-on: custom-arm64-jammy
    16  
    17      steps:
    18        - uses: actions/checkout@v4
    19        - uses: ./.github/actions/setup-go-for-project-v3
    20        - run: go version
    21  
    22        - name: Build the metalgo binaries
    23          run: ./scripts/build.sh
    24  
    25        - name: Install aws cli
    26          run: |
    27            sudo apt update
    28            sudo apt -y install awscli
    29  
    30        - name: Configure AWS credentials
    31          uses: aws-actions/configure-aws-credentials@v4
    32          with:
    33            aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
    34            aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    35            aws-region: us-east-1
    36  
    37        - name: Try to get tag from git
    38          if: "${{ github.event.inputs.tag == '' }}"
    39          id: get_tag_from_git
    40          run: |
    41            echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
    42          shell: bash
    43  
    44        - name: Try to get tag from workflow dispatch
    45          if: "${{ github.event.inputs.tag != '' }}"
    46          id: get_tag_from_workflow
    47          run: |
    48            echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
    49          shell: bash
    50  
    51        - name: Create debian package
    52          run: ./.github/workflows/build-deb-pkg.sh
    53          env:
    54            PKG_ROOT: /tmp/metalgo
    55            TAG: ${{ env.TAG }}
    56            BUCKET: ${{ secrets.BUCKET }}
    57            ARCH: "arm64"
    58            RELEASE: "jammy"
    59  
    60        - name: Save as Github artifact
    61          uses: actions/upload-artifact@v4
    62          with:
    63            name: jammy
    64            path: /tmp/metalgo/metalgo-${{ env.TAG }}-arm64.deb
    65  
    66        - name: Cleanup
    67          run: |
    68            rm -rf ./build
    69            rm -rf /tmp/metalgo
    70  
    71    build-focal-arm64-package:
    72      runs-on: custom-arm64-focal
    73  
    74      steps:
    75        - uses: actions/checkout@v4
    76        - uses: ./.github/actions/install-focal-deps
    77        - uses: ./.github/actions/setup-go-for-project-v3
    78        - run: go version
    79  
    80        - name: Build the metalgo binaries
    81          run: ./scripts/build.sh
    82  
    83        - name: Install aws cli
    84          run: |
    85            sudo apt update
    86            sudo apt -y install awscli
    87  
    88        - name: Configure AWS credentials
    89          uses: aws-actions/configure-aws-credentials@v4
    90          with:
    91            aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
    92            aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    93            aws-region: us-east-1
    94  
    95        - name: Try to get tag from git
    96          if: "${{ github.event.inputs.tag == '' }}"
    97          id: get_tag_from_git
    98          run: |
    99            echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
   100          shell: bash
   101  
   102        - name: Try to get tag from workflow dispatch
   103          if: "${{ github.event.inputs.tag != '' }}"
   104          id: get_tag_from_workflow
   105          run: |
   106            echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
   107          shell: bash
   108  
   109        - name: Create debian package
   110          run: ./.github/workflows/build-deb-pkg.sh
   111          env:
   112            PKG_ROOT: /tmp/metalgo
   113            TAG: ${{ env.TAG }}
   114            BUCKET: ${{ secrets.BUCKET }}
   115            ARCH: "arm64"
   116            RELEASE: "focal"
   117  
   118        - name: Save as Github artifact
   119          uses: actions/upload-artifact@v4
   120          with:
   121            name: focal
   122            path: /tmp/metalgo/metalgo-${{ env.TAG }}-arm64.deb
   123  
   124        - name: Cleanup
   125          run: |
   126            rm -rf ./build
   127            rm -rf /tmp/metalgo