Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add step to upload artifact with contracts' json files #673

Merged
7 commits merged into from
Oct 24, 2022
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/deploy-the-button.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,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