-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (72 loc) · 1.9 KB
/
main.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
name: main
on:
workflow_dispatch:
push:
branches:
- master
tags:
- v*.*.*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- converted_to_draft
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- channel: dev
experimental: true
- channel: rc
experimental: true
- channel: release
experimental: false
continue-on-error: ${{ github.event.pull_request != null && github.event.pull_request.draft || matrix.experimental }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: |
pip install ufbt
- uses: actions/cache@v3
id: cache-ufbt
with:
path: ~/.ufbt
key: ${{ runner.os }}-${{ matrix.channel }}-ufbt
- run: |
ufbt update --channel=${{ matrix.channel }}
- run: |
ufbt
- uses: actions/upload-artifact@v3
with:
name: app.${{ matrix.channel }}
if-no-files-found: error
path: |
dist/*.fap
~/.ufbt/current/ufbt_state.json
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v3
with:
name: app.release
path: ~/
- run: |
echo "SDK_STATE=$(awk 1 ORS='' ~/.ufbt/current/ufbt_state.json)" >> $GITHUB_ENV
- run: |
echo "Flipper firmware version: ${{ fromJson(env.SDK_STATE).version }}" >> release.txt
- uses: softprops/action-gh-release@v1
with:
files: |
dist/*.fap
draft: true
body_path: release.txt
append_body: true
generate_release_notes: true