Files
Android-nRF-Toolbox/.github/workflows/generate-readme.yml
Sylwester Zieliński 9cdd253efc Add github actions
2022-01-31 10:24:37 +01:00

24 lines
742 B
YAML

name: Generate README.md
on:
workflow_dispatch:
jobs:
restorePassword:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- shell: bash
env:
CONTACT_EMAIL: ${{ secrets.CONTACT_EMAIL }}
run: |
git config user.email $CONTACT_EMAIL
git config user.name "Github Action"
git describe --tags
VERSION=`git describe --tags --abbrev=0`
VERSION=`./moustache/split.sh $VERSION`
rm -f ./README.md
VERSION=$VERSION ./moustache/mo ./moustache/README.mo > ./README.md
git add .
git diff-index --quiet HEAD || git commit -m "Update readme to version=$VERSION" && git push