Skip to content

Commit

Permalink
Fix update package version condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bobvandevijver committed Oct 31, 2024
1 parent 665fda4 commit c7f62b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,24 @@ jobs:
sentryVersion="$(jq -r '.devDependencies."@sentry/node"' package.json)"
echo "version_ok=$(jq -r ".version == \"$sentryVersion\"" package.json)" >> $GITHUB_OUTPUT
echo "sentry_version=$sentryVersion" >> $GITHUB_OUTPUT
update_package_version:
name: Update package version if Sentry was updated
permissions:
contents: write
runs-on: ubuntu-latest
needs: check_if_sentry_updated
if: needs.check_if_sentry_updated.outputs.version_ok == 'true'
if: needs.check_if_sentry_updated.outputs.version_ok == 'false'
steps:
- name: Checkout git repository
uses: actions/checkout@v4

- name: Set up node 18 environment
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Update package.json, commit and push
run: |
updatedManifest=$(jq ".version = \"${{ needs.check_if_sentry_updated.outputs.sentry_version }}\"" package.json)
Expand Down

0 comments on commit c7f62b4

Please sign in to comment.