diff --git a/.github/workflows/npm-gulp.yml b/.github/workflows/npm-gulp.yml index 662757f..5a382a3 100644 --- a/.github/workflows/npm-gulp.yml +++ b/.github/workflows/npm-gulp.yml @@ -17,15 +17,14 @@ jobs: uses: actions/setup-node@v3 with: node-version: 16.x - + - name: add package-version to environment + run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV - name: Build run: | npm install gulp - - name: package-version + - name: create package-version artifact run: node -p -e '`${require("./package.json").version}`' >> build/version.txt - - name: package-version environment - run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV - name: package-version-to-git-tag uses: pkgdeps/git-tag-action@v2 with: diff --git a/gulpfile.js b/gulpfile.js index 604a4dc..e029cfe 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -48,7 +48,7 @@ gulp.task('transpile-ts', function () { return path.relative(path.dirname(file.path), file.base); } })) - .pipe(replace('@VERSION@', String(process.env.npm_package_version))) + .pipe(replace('@VERSION@', String(process.env.PACKAGE_VERSION))) .pipe(replace('@PRIMARY@', String(process.env.THEME_PRIMARY))) .pipe(replace('@PRIMARY_LIGHT@', String(process.env.THEME_PRIMARY_LIGHT))) .pipe(replace('@PRIMARY_DARK@', String(process.env.THEME_PRIMARY_DARK)))