File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 4141 - name : Enable code signing only for current repo
4242 if : github.event.pull_request.head.repo.full_name == github.repository
4343 run : echo "CSC_FOR_PULL_REQUEST=true" >> $GITHUB_ENV
44+
45+ - name : Set dev version
46+ run : |
47+ echo "Creating patch-version.js"
48+ cat << 'EOF' > patch-version.js
49+ const fs = require('fs');
50+ const pkg = require('./package.json');
51+ const sha = process.env.COMMIT_SHA.slice(0, 7);
52+ const pr = process.env.PR_NUMBER;
53+ const baseVersion = pkg.version.replace(/-dev.*$/, '');
54+ pkg.version = `${baseVersion}-dev.pr${pr}.${sha}`;
55+ fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
56+ console.log("Updated version:", pkg.version);
57+ EOF
58+ node patch-version.js
59+ shell : bash
60+ env :
61+ GITHUB_SHA : ${{ github.sha }}
62+ PR_NUMBER : ${{ github.event.pull_request.number }}
63+ COMMIT_SHA : ${{ github.event.pull_request.head.sha }}
4464
4565 - name : Build/release Electron app
4666 uses : samuelmeuli/action-electron-builder@v1
You can’t perform that action at this time.
0 commit comments