Skip to content

Commit

Permalink
Set version in package.json before release
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven65 committed Sep 9, 2024
1 parent be81f38 commit 1ff132c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update version in package.json
run: |
# Read the latest release version from environment variable
LATEST_VERSION="${{ env.LATEST_RELEASE }}"
# Update the "version" field in package.json using jq
jq --arg version "$LATEST_VERSION" '.version = $version' package.json > temp.json && mv temp.json package.json
- name: Setup node
uses: actions/setup-node@v3
with:
Expand Down

0 comments on commit 1ff132c

Please sign in to comment.