github.com/koko1123/flow-go-1@v0.29.6/.github/workflows/tools.yml (about)

     1  name: Build Tools
     2  
     3  on:
     4    workflow_dispatch:
     5      inputs:
     6        tag:
     7          description: 'Tagged commit to build tools against'
     8          required: true
     9          type: string
    10        promote:
    11          description: 'Should this build be promoted to the official boot-tools?'
    12          required: false
    13          type: boolean
    14  
    15  jobs:
    16    build-publish:
    17      name: Build boot tools
    18      runs-on: ubuntu-latest
    19      steps:
    20      - id: auth
    21        uses: google-github-actions/auth@v1
    22        with:
    23          credentials_json: ${{ secrets.GCR_SERVICE_KEY }} # TODO: we need a new key to allow uploads
    24      - name: Setup Go
    25        uses: actions/setup-go@v2
    26        with:
    27          go-version: '1.19'
    28      - name: Set up Google Cloud SDK
    29        uses: google-github-actions/setup-gcloud@v1
    30        with:
    31          project_id: flow
    32      - name: Checkout repo
    33        uses: actions/checkout@v2
    34        with:
    35          ref: ${{ inputs.tag }}
    36      - name: Build relic
    37        run: make crypto_setup_gopath
    38      - name: Build and upload boot-tools
    39        run: |
    40          make tool-bootstrap tool-transit
    41          mkdir boot-tools
    42          mv bootstrap transit boot-tools/
    43          tar -czf boot-tools.tar ./boot-tools/
    44          gsutil cp boot-tools.tar gs://flow-genesis-bootstrap/tools/${{ inputs.tag }}/boot-tools.tar
    45      - name: Build and upload util
    46        run: |
    47          make tool-util
    48          tar -czf util.tar util
    49          gsutil cp util.tar gs://flow-genesis-bootstrap/tools/${{ inputs.tag }}/util.tar
    50      - name: Promote boot-tools
    51        run: |
    52          if [[ "${{ inputs.promote }}" = true ]]; then
    53            echo "promoting boot-tools.tar"
    54            gsutil cp boot-tools.tar gs://flow-genesis-bootstrap/boot-tools.tar
    55          else
    56            echo "not promoting boot-tools.tar"
    57          fi