-
Notifications
You must be signed in to change notification settings - Fork 16
35 lines (34 loc) · 1.02 KB
/
versioning.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
name: Set Lib Version
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required due to the way Git works
- name: 'Get tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
- name: Overwrite version.h
uses: "DamianReeves/write-file-action@master"
with:
path: version.h
write-mode: overwrite
contents: |
#include "AsyncFsWebServer.h"
const char* AsyncFsWebServer::getVersion() {
return "${{ steps.previoustag.outputs.tag }}";
}
- name: Commit & Push
uses: Andro999b/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
message: 'Overwritten by Github Actions - ${date}'