-
Notifications
You must be signed in to change notification settings - Fork 13
44 lines (36 loc) · 985 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build and Release
on:
push:
tags:
- release*
workflow_dispatch:
env:
AWS_REGION: ap-northeast-1
RABBY_PROD_BUCKET: rabby-fe
CI: true
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Use Node.js v16
uses: actions/setup-node@v1
with:
node-version: v16
- name: Build source code
run: |
npm install -g yarn
yarn install
yarn build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{ env.AWS_REGION }}
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_KEY }}
- name: Copy dists to s3
run: |
aws s3 sync . s3://${RABBY_PROD_BUCKET}/ --delete
working-directory: dist