-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (48 loc) · 1.69 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
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 }}