1212 required : false
1313 type : string
1414
15-
1615jobs :
1716 build :
1817 name : Build binary artifacts
2524 with :
2625 ref : ${{ inputs.ref }}
2726
27+ - name : Get branch name and commit SHA
28+ id : get_branch
29+ uses : ./.github/actions/get-branch
30+
2831 - name : Install Rust toolchain
2932 uses : actions-rs/toolchain@v1
3033
6164 if-no-files-found : error
6265 retention-days : 7
6366
67+ - name : S3 CI | Configure AWS credentials
68+ uses : aws-actions/configure-aws-credentials@v1
69+ env :
70+ AWS_REGION : us-east-1
71+ with :
72+ aws-access-key-id : ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }}
73+ aws-secret-access-key : ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }}
74+ aws-region : ${{ env.AWS_REGION }}
75+
76+ - name : S3 CI | Copy release binary to S3 bucket
77+ shell : bash
78+ env :
79+ BINARY_DIR : target/production
80+ BINARY_FILE : aleph-node
81+ S3BUCKET_URL : s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node
82+ S3BUCKET_FILE : aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz
83+ run : |
84+ tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }}
85+ aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}
86+
87+ - name : S3 CI | Copy release runtime to S3 bucket
88+ shell : bash
89+ env :
90+ BINARY_DIR : target/production/wbuild/aleph-runtime
91+ BINARY_FILE : aleph_runtime.compact.wasm
92+ S3BUCKET_URL : s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-runtime
93+ S3BUCKET_FILE : aleph-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz
94+ run : |
95+ tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }}
96+ aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}
97+
6498 - name : Build test binary
6599 run : cargo build --release -p aleph-node --features "short_session enable_treasury_proposals only_legacy"
66100
@@ -80,5 +114,27 @@ jobs:
80114 if-no-files-found : error
81115 retention-days : 7
82116
117+ - name : S3 CI | Copy test binary to S3 bucket
118+ shell : bash
119+ env :
120+ BINARY_DIR : target/release
121+ BINARY_FILE : aleph-node
122+ S3BUCKET_URL : s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-node
123+ S3BUCKET_FILE : aleph-test-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz
124+ run : |
125+ tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }}
126+ aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}
127+
128+ - name : S3 CI | Copy test runtime to S3 bucket
129+ shell : bash
130+ env :
131+ BINARY_DIR : target/release/wbuild/aleph-runtime
132+ BINARY_FILE : aleph_runtime.compact.wasm
133+ S3BUCKET_URL : s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-runtime
134+ S3BUCKET_FILE : aleph-test-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz
135+ run : |
136+ tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }}
137+ aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}
138+
83139 - name : Cleanup cache
84140 uses : ./.github/actions/post-cache
0 commit comments