-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (32 loc) · 1.06 KB
/
deploy.yml
File metadata and controls
42 lines (32 loc) · 1.06 KB
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
name: Deploy
on:
push:
branches: [ master, beta, alpha ]
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION}}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up build environment
run: |
sudo apt install python-setuptools cmake build-essential ninja-build python-dev libffi-dev libssl-dev
sudo pip install yotta
sudo apt install srecord
sudo apt install gcc-arm-none-eabi
- name: Set target
run: yt target bbc-microbit-classic-gcc
- name: Build
run: yt build
- name: Deploy alpha to S3
if: github.ref == 'refs/heads/alpha'
run: sh deploy.sh alpha
- name: Deploy beta to S3
if: github.ref == 'refs/heads/beta'
run: sh deploy.sh beta
- name: Deploy master to S3
if: github.ref == 'refs/heads/master'
run: sh deploy.sh prod