Skip to content

Commit

Permalink
Use previewnet builder config on build
Browse files Browse the repository at this point in the history
  • Loading branch information
Akamig committed Sep 3, 2024
1 parent 434847b commit 1b22df3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,20 @@ jobs:
then
sed "s/Please replace it/${{ secrets.APPLE_TEAM_ID }}/g" electron-builder.main.yml > temp2.txt
mv temp2.txt electron-builder.main.yml
elif [[ ""$"{{ startsWith(github.event.ref, 'refs/heads/preview/') }}" == true ]]
then
timestamp=$(date +%y%m%d%H%M%S)
version=$(jq -r .version package.json | awk -F'.' '{print $1"."$2}')
jq --arg version "$version.$timestamp" '.version = $version' package.json > tmp.$$.json && mv tmp.$$.json package.json
jq --arg suffix " Preview" '.productName += $suffix' package.json > tmp.$$.json && mv tmp.$$.json package.json
jq --arg suffix "Preview" '.name += $suffix' package.json > tmp.$$.json && mv tmp.$$.json package.json
sed 's/NineChronicles@workspace/NineChroniclesPreview@workspace/g' yarn.lock > temp1.txt
mv temp1.txt yarn.lock
mv ./signing/sandbox_code_sign_tool.properties ./tmp/codesign/conf/code_sign_tool.properties
sed "s/Please replace it/${{ secrets.APPLE_TEAM_ID }}/g" electron-builder.previewnet.yml > temp2.txt
mv temp2.txt electron-builder.previewnet.yml
else
timestamp=$(date +%s)
timestamp=$(date +%y%m%d%H%M%S)
version=$(jq -r .version package.json | awk -F'.' '{print $1"."$2}')
jq --arg version "$version.$timestamp" '.version = $version' package.json > tmp.$$.json && mv tmp.$$.json package.json
jq --arg suffix " Internal" '.productName += $suffix' package.json > tmp.$$.json && mv tmp.$$.json package.json
Expand Down

0 comments on commit 1b22df3

Please sign in to comment.