Skip to content

Update version to 1.4.1 #29

Update version to 1.4.1

Update version to 1.4.1 #29

---
name: Update Documentation Version
on:
push:
branches: ["main"]
paths:
- 'firmware/conf.d/version.yaml'
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Setup yq
uses: vegardit/gha-setup-yq@v1
# Replace the badge with the latest version
# https://img.shields.io/badge/esp32s2-0.1.0-magenta
- name: Read manifest and update docs
run: |
# Read version from manifest.json
VERSION=$(yq eval '.substitutions.version' firmware/conf.d/version.yaml)
echo "VERSION=$VERSION"
sed -i 's/badge\/openspool-[^-]*-magenta/badge\/openspool-'"$VERSION"'-magenta/' docs/index.md
sed -i 's/badge\/openspool-[^-]*-magenta/badge\/openspool-'"$VERSION"'-magenta/' README.md
echo "docs/index.md"
cat docs/index.md | grep shields.io
echo "README.md"
cat README.md | grep shields.io
- name: Commit manifest file
uses: EndBug/add-and-commit@v9
with:
committer_name: GitHub Actions
committer_email: [email protected]
message: Update manifest.json
add: "docs/*.md README.md"
push: true