-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (55 loc) · 2.27 KB
/
ci.yaml
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
name: "Build Factory and OTA Images"
on:
workflow_dispatch:
jobs:
build:
name: "build"
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt update
sudo apt -y install curl wget
sudo apt -y install build-essential libtool gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
sudo apt -y install python3 python3-pip python-is-python3
sudo python -m pip install -U pip
sudo pip install wheel click
- name: Populate vars
id: vars
run: |
echo "build_date=$(date +"%Y%m%d")" >> $GITHUB_OUTPUT
echo "short_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "fw_revision=$(sed -n 's/^#define FW_REVISION\s*"\(.*\)"/\1/p' app/firmware_config.h)" >> $GITHUB_OUTPUT
echo "artifacts_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"" >> $GITHUB_OUTPUT
- name: Build binaries
run: |
./make_binaries.sh
- name: Build signed images
env:
BT_SIG_PK: ${{ secrets.BT_SIG_PK }}
run: |
./make_images.sh
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: "${{ github.event.repository.name }}-${{ steps.vars.outputs.fw_revision }}-${{ steps.vars.outputs.build_date }}-${{ steps.vars.outputs.short_hash }}"
path: |
artifacts/*
artifacts_signed/*
- name: Notify to Slack
uses: onekeyhq/actions/notice-slack-app-update@main
with:
web-hook-url: ${{ secrets.SLACK_DEV_RELEASE_WEBHOOK }}
artifact-type: CLASSIC-FIRMWARE-BT
artifact-name: Classic-Hardware-Firmware-BT
artifact-bundle-id: "so.onekey.firmware.classic.bt"
artifact-version-name: "${{ steps.vars.outputs.fw_revision }}"
artifact-version-code: "${{ steps.vars.outputs.short_hash }}"
artifact-download-url: "${{ steps.vars.outputs.artifacts_url }}"
change-log: "Download [Artifacts] at the bottom of page."
custom-issue-url: ""
custom-message-title: ""
custom-message-payload: ""
filter-code: false