-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (61 loc) · 1.81 KB
/
firmware_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
name: Firmware release
on:
pull_request:
branches: main
types: [closed]
jobs:
get-bump:
name: Get version bump
runs-on: ubuntu-latest
outputs:
bump: ${{ steps.get-version-bump.outputs.bump }}
steps:
- if: github.event.pull_request.merged == true
name: Get version bump
id: get-version-bump
uses: husarion-ci/[email protected]
bump-version:
name: Bump version
runs-on: ubuntu-latest
needs: get-bump
if: needs.get-bump.outputs.bump != 'none'
outputs:
new_version: ${{ steps.bump-semver.outputs.new_version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
with:
with_initial_version: false
semver_only: true
- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: ${{ needs.get-bump.outputs.bump }}
- name: Create tag
run: git tag ${{ steps.bump-semver.outputs.new_version }}
- name: Publish tags
run: git push --tags
firmware-release:
name: Firmware release
needs: bump-version
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Installing platformio
run: pip3 install -U platformio
- name: Building a firmware for STM32
run: git submodule update --init --recursive && pio run
- name: Release a firmware
uses: softprops/action-gh-release@v1
with:
files: |
.pio/build/core2/firmware.bin
.pio/build/core2/firmware.hex
CHANGELOG.md
LICENSE
tag_name: ${{ needs.bump-version.outputs.new_version }}