Skip to content

Update artifacts after stash #13

Update artifacts after stash

Update artifacts after stash #13

name: Update Documentation Version
on:
push:
branches: ["main"]
paths:
- 'artifacts/manifest.json'
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
# 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=$(jq -r .version artifacts/manifest.json)
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
cat docs/index.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"
push: true