Skip to content

Commit

Permalink
Update versioning.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cotestatnt authored Jan 7, 2024
1 parent 8e1da98 commit ecb84ae
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ jobs:
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: 'Get tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"

- name: Read value from Properties-file
id: read_property
uses: christian-draeger/[email protected]
with:
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
path: 'library.properties'
properties: 'version'

- name: Overwrite version.h
uses: "DamianReeves/write-file-action@master"
with:
Expand All @@ -29,7 +32,7 @@ jobs:
contents: |
#include "AsyncFsWebServer.h"
const char* AsyncFsWebServer::getVersion() {
return "${{ steps.previoustag.outputs.tag }}";
return "${{ steps.read_property.outputs.version }}";
}
- name: Commit & Push
uses: Andro999b/[email protected]
Expand Down

0 comments on commit ecb84ae

Please sign in to comment.