mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-08 00:27:39 +03:00
ci: implement semantic release workflow
**Description**: Implement semantic release workflow. Signed-off-by: Andrew Brandt <brandt.andrew89@gmail.com>
This commit is contained in:
parent
6d68466891
commit
0589664924
34
.github/workflows/release.yml
vendored
34
.github/workflows/release.yml
vendored
@ -1,9 +1,12 @@
|
|||||||
name: Compile Release
|
name: Compile Release
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
tags:
|
inputs:
|
||||||
- '*'
|
dry-run-enabled:
|
||||||
|
description: 'Run in dry-run mode (no real release)'
|
||||||
|
required: true
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
jobs:
|
jobs:
|
||||||
build-release:
|
build-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -29,13 +32,32 @@ jobs:
|
|||||||
- name: Build CrossPoint
|
- name: Build CrossPoint
|
||||||
run: pio run -e gh_release
|
run: pio run -e gh_release
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts (for semantic-release assets)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: CrossPoint-${{ github.ref_name }}
|
name: CrossPoint-artifacts
|
||||||
path: |
|
path: |
|
||||||
.pio/build/gh_release/bootloader.bin
|
.pio/build/gh_release/bootloader.bin
|
||||||
.pio/build/gh_release/firmware.bin
|
.pio/build/gh_release/firmware.bin
|
||||||
.pio/build/gh_release/firmware.elf
|
.pio/build/gh_release/firmware.elf
|
||||||
.pio/build/gh_release/firmware.map
|
.pio/build/gh_release/firmware.map
|
||||||
.pio/build/gh_release/partitions.bin
|
.pio/build/gh_release/partitions.bin
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install Semantic Release
|
||||||
|
run: npm install -g semantic-release@24.2.4 @semantic-release/exec@7.1.0 conventional-changelog-conventionalcommits@8.0.0
|
||||||
|
|
||||||
|
- name: Run semantic-release (dry run if requested)
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
FLAGS=""
|
||||||
|
if [[ "${{ inputs.dry-run-enabled }}" == "true" ]]; then
|
||||||
|
FLAGS="--dry-run"
|
||||||
|
fi
|
||||||
|
|
||||||
|
npx semantic-release ${FLAGS}
|
||||||
|
|||||||
37
.releaserc
Normal file
37
.releaserc
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
"preset": "conventionalcommits"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
{
|
||||||
|
"preset": "conventionalcommits"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/github",
|
||||||
|
{
|
||||||
|
"assets": [
|
||||||
|
".pio/build/gh_release/bootloader.bin",
|
||||||
|
".pio/build/gh_release/firmware.bin",
|
||||||
|
".pio/build/gh_release/firmware.elf",
|
||||||
|
".pio/build/gh_release/firmware.map",
|
||||||
|
".pio/build/gh_release/partitions.bin"
|
||||||
|
],
|
||||||
|
"successComment": false,
|
||||||
|
"failComment": false,
|
||||||
|
"message": "Release - ${nextRelease.version}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"branches",
|
||||||
|
{
|
||||||
|
"name": "main"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user