scacner / badnest

A bad Nest integration that uses the web api to work after Works with Nest was shut down.
0 stars 1 forks source link

Automate bumping the version number #12

Open scacner opened 3 years ago

scacner commented 3 years ago

Release-Drafter auto sets the new version number to be released. See if there's a way to auto-increment the version key in manifest.json with the version number that Release-Drafter determines.

scacner commented 3 years ago

One possible action step that has been half-baked/thought of:

        run: |
          VERSION=$(echo $GITHUB_REF | sed -E 's/.*(v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*))/\1/')
          sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/g" custom_components/badnest/manifest.json
          git config user.name github-actions
          git config user.email github-actions@github.com
          git add .
          git commit -m "update manifest version"
          git push