Skip to content

v6.0.0

v6.0.0 #73

Workflow file for this run

name: Deploy to S3
on:
release:
types: [created]
# Required for authenticating with AWS IAM
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
with:
role-to-assume: arn:aws:iam::693696263829:role/token-list-github-action-role
role-session-name: githubactionsession
aws-region: eu-central-1
- name: Upload to S3
run: |
aws s3 cp src/public/CowSwap.json s3://files.cow.fi/tokens/CowSwap.json
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation \
--distribution-id $DIST_ID \
--paths "/tokens/*"
env:
DIST_ID: ${{ secrets.DISTRIBUTION }}