File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,12 +62,15 @@ jobs:
6262 git push
6363 else
6464 CHANNEL=beta
65- # Base version with any existing prerelease suffix stripped, plus a
66- # monotonic -beta.<run_number>. electron-builder turns the -beta suffix
67- # into the `beta` channel (beta-mac.yml) automatically. No commit.
65+ # A nightly is a prerelease of the NEXT patch, so it sorts ABOVE the last
66+ # stable, not below it: 0.0.35 stable -> 0.0.36-beta.<run> (NOT
67+ # 0.0.35-beta.<run>, which semver ranks BELOW 0.0.35 and would read as a
68+ # downgrade). electron-builder turns the -beta suffix into the `beta`
69+ # channel (beta-mac.yml) automatically. No commit.
6870 BASE=$(node -p "require('./package.json').version")
6971 BASE=${BASE%%-*}
70- VERSION="${BASE}-beta.${{ github.run_number }}"
72+ NEXT=$(node -e "const p='$BASE'.split('.').map(Number); console.log(p[0]+'.'+p[1]+'.'+(p[2]+1))")
73+ VERSION="${NEXT}-beta.${{ github.run_number }}"
7174 fi
7275 echo "channel=$CHANNEL" >> "$GITHUB_OUTPUT"
7376 echo "version=$VERSION" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments