Skip to content

Commit

Permalink
update package-lock.json automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Jul 4, 2023
1 parent 31cd4af commit c95ace4
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ jobs:
fetch-depth: 0
token: ${{ secrets.PUSH_GITHUB_TOKEN }}

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Update Version to Release Tag
run: |
# Extract the release tag number
Expand All @@ -33,13 +29,10 @@ jobs:
sed -i "s/\"version\": \".*\"/\"version\": \"$TAG\"/" bindings/nodejs/nodered/package.json
sed -i "s/\"hvps\": \".*\"/\"hvps\": \"$TAG\"/" bindings/nodejs/nodered/package.json
# Update the package.lock for the nodered node
npm install --prefix bindings/nodejs/nodered
# Commit and push changes
git config --local user.name "Luis Antonio Obis Aparicio"
git config --local user.email "luis.antonio.obis@gmail.com"
git add src/hvps/version.py bindings/nodejs/hvps/package.json bindings/nodejs/nodered/package.json bindings/nodejs/nodered/package-lock.json
git add src/hvps/version.py bindings/nodejs/hvps/package.json bindings/nodejs/nodered/package.json
git commit -m "Update version to $TAG"
git push origin HEAD:main
Expand Down Expand Up @@ -159,6 +152,17 @@ jobs:
cache-dependency-path: bindings/nodejs/nodered/package-lock.json
registry-url: 'https://registry.npmjs.org'

- name: Update package-lock.json
run: npm install

- name: Push changes
run: |
git config --local user.name "Luis Antonio Obis Aparicio"
git config --local user.email "luis.antonio.obis@gmail.com"
git add bindings/nodejs/nodered/package-lock.json
git commit -m "Update nodered package-lock.json"
git push origin HEAD:main
- name: Install dependencies
run: npm ci

Expand Down

0 comments on commit c95ace4

Please sign in to comment.