-
-
Notifications
You must be signed in to change notification settings - Fork 147
26 lines (22 loc) · 788 Bytes
/
Copy pathupdate-version.yml
File metadata and controls
26 lines (22 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Update Version in manifest.json
on:
release:
types: [published]
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Update version in manifest.json and commit
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
VERSION=${GITHUB_REF#refs/tags/}
MANIFEST=custom_components/ocpp/manifest.json
jq --arg version "$VERSION" '.version = $version' $MANIFEST > tmp.json && mv tmp.json $MANIFEST
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add $MANIFEST
git commit -m "Update version in manifest.json to $VERSION"
git push