This commit is contained in:
2025-12-04 14:52:39 -05:00
parent a967176454
commit 34b2aed773
2 changed files with 13 additions and 4 deletions

View File

@@ -43,10 +43,7 @@ jobs:
- name: Get version from package.json
id: version
working-directory: electron-app
shell: pwsh
run: |
$VERSION = node -p "require('./package.json').version"
echo "VERSION=$VERSION" >> $env:GITHUB_OUTPUT
run: node scripts/get-version.js
- name: Create Release and Upload exe
uses: softprops/action-gh-release@v1

View File

@@ -0,0 +1,12 @@
const fs = require('fs');
const path = require('path');
const pkgPath = path.join(__dirname, '..', 'package.json');
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
const outputFile = process.env.GITHUB_OUTPUT;
if (outputFile) {
fs.appendFileSync(outputFile, `VERSION=${pkg.version}\n`);
}
console.log(pkg.version);