github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/.github/workflows/tools.yml (about) 1 # This workflow is used to build and upload the node bootstrapping tools 2 name: Build Tools 3 4 on: 5 workflow_dispatch: 6 inputs: 7 tag: 8 description: 'Tag/commit' 9 required: true 10 type: string 11 promote: 12 description: 'Promote to official boot-tools?' 13 required: false 14 type: boolean 15 16 jobs: 17 build-publish: 18 name: Build boot tools 19 runs-on: ubuntu-latest 20 steps: 21 - name: Print all input variables 22 run: echo '${{ toJson(inputs) }}' | jq 23 - id: auth 24 uses: google-github-actions/auth@v1 25 with: 26 credentials_json: ${{ secrets.GCR_SERVICE_KEY }} 27 - name: Set up Google Cloud SDK 28 uses: google-github-actions/setup-gcloud@v1 29 with: 30 project_id: flow 31 - name: Setup Go 32 uses: actions/setup-go@v4 33 with: 34 go-version: "1.20" 35 - name: Checkout repo 36 uses: actions/checkout@v3 37 with: 38 # to accurately get the version tag 39 fetch-depth: 0 40 ref: ${{ inputs.tag }} 41 - name: Build and upload boot-tools 42 run: | 43 make tool-bootstrap tool-transit 44 mkdir boot-tools 45 mv bootstrap transit boot-tools/ 46 tar -czf boot-tools.tar ./boot-tools/ 47 gsutil cp boot-tools.tar gs://flow-genesis-bootstrap/tools/${{ inputs.tag }}/boot-tools.tar 48 - name: Build and upload util 49 run: | 50 make tool-util 51 tar -czf util.tar util 52 gsutil cp util.tar gs://flow-genesis-bootstrap/tools/${{ inputs.tag }}/util.tar 53 - name: Promote boot-tools 54 run: | 55 if [[ "${{ inputs.promote }}" = true ]]; then 56 echo "promoting boot-tools.tar" 57 gsutil cp boot-tools.tar gs://flow-genesis-bootstrap/boot-tools.tar 58 SUMMARY=$'# Tool Build and Upload Summary \n Your tools were uploaded to the following GCS objects \n * Boot Tools gs://flow-genesis-bootstrap/boot-tools.tar \n * Util util.tar gs://flow-genesis-bootstrap/tools/${{ inputs.tag }}/util.tar' 59 else 60 echo "not promoting boot-tools.tar" 61 SUMMARY=$'# Tool Build and Upload Summary \n Your tools were uploaded to the following GCS objects \n * Boot Tools gs://flow-genesis-bootstrap/tools/${{ inputs.tag }}/boot-tools.tar \n * Util util.tar gs://flow-genesis-bootstrap/tools/${{ inputs.tag }}/util.tar' 62 fi 63 echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY