Skip to content

Commit

Permalink
update publish action to format files in order to avoid pre-commit er…
Browse files Browse the repository at this point in the history
…rors
  • Loading branch information
lobis committed Aug 9, 2023
1 parent e0b1530 commit e9201c3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,22 @@ jobs:
sed -i "s/\"version\": \".*\"/\"version\": \"$TAG\"/" bindings/nodejs/nodered/package.json
sed -i "s/\"hvps\": \".*\"/\"hvps\": \"$TAG\"/" bindings/nodejs/nodered/package.json
# Commit and push changes
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Run pre-commit
run: |
python -m pip install pre-commit
pre-commit run --all-files || true # ignore errors, we want to format the files
- name: Commit and push changes
run: |
git config --local user.name "Luis Antonio Obis Aparicio"
git config --local user.email "[email protected]"
git add src/hvps/version.py bindings/nodejs/hvps/package.json bindings/nodejs/nodered/package.json
git commit -m "Update version to $TAG"
git commit -m "Update version to ${{ github.event.release.tag_name }}"
git push origin HEAD:main
- name: cache source code after modification
Expand Down

0 comments on commit e9201c3

Please sign in to comment.