Skip to content

Commit

Permalink
Add step to upload artifact with contracts' json files (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj Gasior committed Oct 24, 2022
1 parent c224093 commit 2d6f21c
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/deploy-the-button.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ name: Deploy The Button game
on:
pull_request:
types: [labeled]
#push:
# branches:
# - benjamin
push:
branches:
- benjamin
paths:
- contracts/**

concurrency:
group: ${{ github.workflow }}
Expand Down Expand Up @@ -143,6 +145,30 @@ jobs:
source contracts/env/${{ env.CONTRACTS_ENVFILE }} && echo -n "$NODE" > env_NODE.txt
aws s3 cp env_NODE.txt s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/env_NODE.txt
- name: Rename metadata and addresses JSON files to artifact upload
shell: bash
run: |
cp contracts/addresses.json addresses.${{ env.CONTRACTS_ENVFILE }}.json
for i in ticket_token marketplace button game_token access_control; do \
cp contracts/"$i"/target/ink/metadata.json metadata_"$i".${{ env.CONTRACTS_ENVFILE }}.json \
done
- name: Upload artifact with contract addresses
uses: actions/upload-artifact@v3
with:
name: contracts-addresses
path: addresses.${{ env.CONTRACTS_ENVFILE }}.json
if-no-files-found: error
retention-days: 90

- name: Upload artifact with contract metadata
uses: actions/upload-artifact@v3
with:
name: contracts-metadata
path: metadata_*.${{ env.CONTRACTS_ENVFILE }}.json
if-no-files-found: error
retention-days: 90

- name: Cache contracts' target directories in S3 bucket
shell: bash
run: |
Expand Down

0 comments on commit 2d6f21c

Please sign in to comment.