-
Notifications
You must be signed in to change notification settings - Fork 323
84 lines (73 loc) · 2.85 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Release
on:
release:
types: [created]
jobs:
build-upload:
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get -y install libusb-1.0-0 cmake srecord
pip install -U pyserial
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Prepare Release Assets
run: |
./scripts/build-firmware
mkdir assets
cp build/konnected-esp8266-latest.bin assets/konnected-esp8266-${{ steps.get_release.outputs.tag_name }}.bin
cp build/app/lfs.img assets/lfs-${{ steps.get_release.outputs.tag_name }}.img
- name: Upload asset to release
uses: bgpat/release-asset-action@03b0c30db1c4031ce3474740b0e4275cd7e126a3
with:
pattern: "assets/*"
release-url: ${{ steps.get_release.outputs.upload_url }}
allow-overwrite: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: keithweaver/[email protected]
name: Copy image to S3
with:
command: cp
source: assets/konnected-esp8266-${{ steps.get_release.outputs.tag_name }}.bin
destination: s3://konnected-io/esp8266/images/
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: us-east-2
flags: --acl public-read
- uses: keithweaver/[email protected]
name: Copy LFS to S3
with:
command: cp
source: assets/lfs-${{ steps.get_release.outputs.tag_name }}.img
destination: s3://konnected-io/esp8266/lfs/
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: us-east-2
flags: --acl public-read
- name: Build manifest.json for ESP Webtools on install.konnected.io
run: |
ruby ./scripts/update-espwebtools-manifest.rb
env:
RELEASE_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/esp8266/images/konnected-esp8266-${{ steps.get_release.outputs.tag_name }}.bin
CHIP_FAMILY: ESP8266
- uses: keithweaver/[email protected]
name: Copy manifest.json to S3
with:
command: cp
source: assets/manifest.json
destination: s3://install-konnected/
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: us-east-1
flags: --acl public-read