Skip to content

Commit

Permalink
Favor using semver directly from npm than the os package
Browse files Browse the repository at this point in the history
The os package have unbundled dependencies which currently results in following stacktrace when trying to publish the 3.0.0 release:

Error: Cannot find module 'lru-cache'
Require stack:
- /usr/share/nodejs/semver/classes/range.js
- /usr/share/nodejs/semver/classes/comparator.js
- /usr/share/nodejs/semver/index.js
- /usr/share/nodejs/semver/bin/semver.js
  • Loading branch information
WtfJoke committed Mar 17, 2023
1 parent 85b01bc commit 78955fd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ jobs:
VERSION: ${{ github.event.inputs.version }}

steps:
- name: Install semver
run: sudo apt-get install -y node-semver
- name: Validate is valid version
run: semver $VERSION
run: npx -y semver $VERSION
- uses: actions/checkout@v3
with:
fetch-depth: 0 # need git history for spotless license header
Expand All @@ -40,7 +38,7 @@ jobs:
git tag -a -m "Release $VERSION" v$VERSION
- name: Move to next Snapshot
run: |
NEXT_VERSION=`semver $VERSION -i`-SNAPSHOT
NEXT_VERSION=`npx -y semver $VERSION -i`-SNAPSHOT
./mvnw versions:set-property -Dproperty=revision -DnewVersion=$NEXT_VERSION
cp chaos-monkey-docs/src/main/asciidoc/changes.adoc.template chaos-monkey-docs/src/main/asciidoc/changes.adoc
git commit -m "Prepare for next version: $NEXT_VERSION" -o pom.xml chaos-monkey-docs/src/main/asciidoc/changes.adoc
Expand Down

0 comments on commit 78955fd

Please sign in to comment.