Skip to content

firmware-release

firmware-release #12

name: firmware-release
on:
workflow_dispatch:
inputs:
release_mode:
description: 'Release Mode (Major|Minor)'
required: true
default: 'Minor'
release_description:
description: 'Release Description'
required: false
default: 'At-RTOS release new firmware.'
jobs:
auto-version:
name: Generate At-RTOS Version
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Execute Version Script
id: version
shell: powershell
run: |
$message = powershell.exe -ExecutionPolicy bypass .\Build.ps1 -Environment Remote -Version ${{ github.event.inputs.release_mode }}
echo "value=$message" >> "$env:GITHUB_OUTPUT"
- name: Configure git
shell: powershell
run: |
git config --global user.name ${{ github.actor }}
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git add .
git commit -m "[v${{steps.version.outputs.value}}]: ${{ github.event.inputs.release_description }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Auto Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{steps.version.outputs.value}}
release_name: v${{steps.version.outputs.value}}
draft: false
prerelease: false
owner: ${{ github.actor }}