diff --git a/.github/workflows/create-package.yml b/.github/workflows/create-package.yml index 91b40fa2..60002b1b 100644 --- a/.github/workflows/create-package.yml +++ b/.github/workflows/create-package.yml @@ -25,11 +25,12 @@ jobs: node-version: "14.19.0" - run: npm ci - run: npm run build - - run: | + - name: Compute pre-release version + run: | CURRENT_VERSION=$(grep -o '\"version\": *\"[^\"]*\"' package.json | awk -F'\"' '{print $4}') BUILD_VERSION="$CURRENT_VERSION-alpha.$(date +%Y%m%d)" echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_ENV - npm version "$BUILD_VERSION" + - run: npm version "$BUILD_VERSION" --no-git-tag-version - run: npm pack # upload the .tgz as a build artifact