Skip to content

Pc connection

Pc connection #21

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/action-get-version-bump@v0.3.0
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 }}