Merge branch 'master' of https://github.com/cotestatnt/async-esp-fs-w… #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Set Lib Version | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
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: Read value from Properties-file | |
id: read_property | |
uses: christian-draeger/[email protected] | |
with: | |
path: 'library.properties' | |
properties: 'version' | |
- name: Overwrite version.h | |
uses: "DamianReeves/write-file-action@master" | |
with: | |
path: src/Version.cpp | |
write-mode: overwrite | |
contents: | | |
#include "AsyncFsWebServer.h" | |
const char* AsyncFsWebServer::getVersion() { | |
return "${{ steps.read_property.outputs.version }}"; | |
} | |
- name: Commit & Push | |
uses: Andro999b/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: master | |
force: true | |
message: 'Overwritten by Github Actions' |