2022-01-05 11:34:47 +01:00
|
|
|
name: 'Release static assets to CDN'
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14.x]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2022-01-05 11:40:39 +01:00
|
|
|
uses: actions/setup-node@v2
|
2022-01-05 11:34:47 +01:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2022-01-05 11:40:39 +01:00
|
|
|
- run: yarn
|
2022-01-05 11:34:47 +01:00
|
|
|
- uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
|
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
|
2022-01-05 11:56:13 +01:00
|
|
|
- name: Get the version
|
|
|
|
id: get_version
|
|
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
2022-01-05 11:46:04 +01:00
|
|
|
- name: Deploy static assets to S3
|
2022-01-05 11:34:47 +01:00
|
|
|
run: |
|
2022-01-05 13:37:39 +01:00
|
|
|
aws s3 cp build/ s3://getunleash-static/unleash/${{ steps.get_version.outputs.VERSION }} --recursive
|
2022-01-05 11:34:47 +01:00
|
|
|
|