Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
6e04dc1c74
|
|||
|
34b2aed773
|
|||
|
a967176454
|
|||
|
56bc506aae
|
|||
|
fd36c61f8f
|
@@ -43,9 +43,7 @@ jobs:
|
|||||||
- name: Get version from package.json
|
- name: Get version from package.json
|
||||||
id: version
|
id: version
|
||||||
working-directory: electron-app
|
working-directory: electron-app
|
||||||
run: |
|
run: node scripts/get-version.cjs
|
||||||
$version = (Get-Content package.json | ConvertFrom-Json).version
|
|
||||||
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create Release and Upload exe
|
- name: Create Release and Upload exe
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rmtpocketwatcher",
|
"name": "rmtpocketwatcher",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "Real-time AUEC price tracking desktop application",
|
"description": "Real-time AUEC price tracking desktop application",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/main/index.js",
|
"main": "dist/main/index.js",
|
||||||
|
|||||||
12
electron-app/scripts/get-version.cjs
Normal file
12
electron-app/scripts/get-version.cjs
Normal 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);
|
||||||
Reference in New Issue
Block a user