v2.34.0 #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
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 ${{ secrets.DISTRIBUTION }} \ | |
--paths "/tokens/*" |