diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd342ea..64e6b9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,13 @@ jobs: - name: Install dependencies run: npm ci + - name: Get name and version from package.json + run: | + test -n $(node -p -e "require('./package.json').name") && + test -n $(node -p -e "require('./package.json').version") && + echo PACKAGE_NAME=$(node -p -e "require('./package.json').name") >> $GITHUB_ENV && + echo PACKAGE_VERSION=$(node -p -e "require('./package.json').version") >> $GITHUB_ENV || exit 1 + - name: Release uses: softprops/action-gh-release@v2 with: