Skip to content

Commit d26803b

Browse files
committed
Add releaser workflow
1 parent 1e24a46 commit d26803b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/releaser.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish new release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Release version'
8+
required: true
9+
default: 'warning'
10+
type: string
11+
12+
jobs:
13+
create-release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: "Update version"
19+
run: |
20+
sed -i "s/\(project(WARDuino VERSION \)[0-9]\+\.[0-9]\+\.[0-9]\+/\1$VERSION/" CMakeLists.txt
21+
sed -i "s/\(version=\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1$VERSION/" library.properties
22+
env:
23+
VERSION: ${{ inputs.version }}
24+
25+
- name: Update metadata
26+
run: |
27+
git config user.name "github-actions[bot]"
28+
git config user.email "github-actions[bot]@users.noreply.github.com"
29+
#git add CMakeLists.txt library.properties
30+
31+
- name: Create pull request
32+
uses: peter-evans/create-pull-request@v7
33+
with:
34+
commit-message: "🔖 Bump version to ${{ inputs.version }}"
35+
branch: release
36+
title: "Release for ${{ inputs.version }}"
37+
body: "This is an automated PR for the next release, version: ${{ inputs.version }}."
38+

0 commit comments

Comments
 (0)