-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): version 0.47.5 (#799)
- Loading branch information
Showing
6 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,37 +63,47 @@ jobs: | |
name: sourcemap | ||
path: | | ||
xmcl-electron-app/dist/*.js.map | ||
- name: Upload Build | ||
- name: Upload Unsigned Appx | ||
if: ${{ runner.os == 'Windows' && startsWith(github.event.head_commit.message, 'chore(release)') }} | ||
id: upload-artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-${{ runner.os }} | ||
name: appx | ||
path: | | ||
xmcl-electron-app/build/output/ | ||
xmcl-electron-app/build/output/*.appx | ||
- name: Sign Build | ||
if: ${{ runner.os == 'Windows' && startsWith(github.event.head_commit.message, 'chore(release)') }} | ||
id: sign | ||
uses: signpath/[email protected] | ||
continue-on-error: true | ||
with: | ||
api-token: ${{ secrets.CODE_SIGN_TOKEN }} | ||
organization-id: ab51b40d-a5bd-4d25-ae54-66ccabf86161 | ||
project-slug: x-minecraft-launcher | ||
signing-policy-slug: release-signing | ||
github-artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }} | ||
artifact-configuration-slug: build | ||
artifact-configuration-slug: appx | ||
wait-for-completion: true | ||
output-artifact-directory: xmcl-electron-app/build/output/ | ||
- name: Check Sign Status | ||
id: sign-status | ||
if: ${{ runner.os == 'Windows' && startsWith(github.event.head_commit.message, 'chore(release)') }} | ||
run: | | ||
if ("${{ steps.sign.outcome }}" -eq "success") { | ||
echo "SIGN_SUCCESS=true" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
} else { | ||
echo "SIGN_SUCCESS=false" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
} | ||
- name: Update Signed Sha256 | ||
if: ${{ runner.os == 'Windows' && startsWith(github.event.head_commit.message, 'chore(release)') }} | ||
run: | | ||
pnpm postsign | ||
- name: Upload Signed Build | ||
if: ${{ runner.os == 'Windows' && startsWith(github.event.head_commit.message, 'chore(release)') }} | ||
- name: Upload Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-${{ runner.os }} | ||
path: | | ||
xmcl-electron-app/build/output/ | ||
overwrite: true | ||
- name: Upload Windows Zip Build | ||
if: ${{ runner.os == 'Windows' }} | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "0.47.4", | ||
"version": "0.47.5", | ||
"private": true, | ||
"license": "MIT", | ||
"packageManager": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "xmcl", | ||
"private": true, | ||
"main": "./index.js", | ||
"version": "0.47.4", | ||
"version": "0.47.5", | ||
"author": "ci010 <[email protected]>", | ||
"description": "A great minecraft launcher in the future", | ||
"license": "MIT", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
import { readdirSync, readFileSync, writeFileSync } from 'fs' | ||
import { readdirSync, readFileSync, writeFileSync, unlinkSync } from 'fs' | ||
import { createHash } from 'crypto' | ||
const success = process.env.SIGN_SUCCESS | ||
|
||
const files = readdirSync('./build/output') | ||
const toUpdate = files.filter((file) => file.endsWith('.appx') || file.endsWith('.zip')) | ||
if (success) { | ||
const files = readdirSync('./build/output') | ||
const toUpdate = files.filter((file) => file.endsWith('.appx') || file.endsWith('.zip')) | ||
|
||
for (const file of toUpdate) { | ||
const hash = createHash('sha256') | ||
const content = readFileSync(`./build/output/${file}`) | ||
hash.update(content) | ||
const digest = hash.digest('hex') | ||
const sha256File = `./build/output/${file}.sha256` | ||
writeFileSync(sha256File, digest) | ||
console.log(`Wrote sha256 hash to ${file} -> ${sha256File} = ${digest}`) | ||
for (const file of toUpdate) { | ||
const hash = createHash('sha256') | ||
const content = readFileSync(`./build/output/${file}`) | ||
hash.update(content) | ||
const digest = hash.digest('hex') | ||
const sha256File = `./build/output/${file}.sha256` | ||
writeFileSync(sha256File, digest) | ||
console.log(`Wrote sha256 hash to ${file} -> ${sha256File} = ${digest}`) | ||
} | ||
} else { | ||
// remove appx | ||
const files = readdirSync('./build/output') | ||
const toDelete = files.filter((file) => file.endsWith('.appx') || file.endsWith('.appinstaller')) | ||
for (const f of toDelete) { | ||
unlinkSync(`./build/output/${f}`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"private": true, | ||
"type": "module", | ||
"productName": "xmcl", | ||
"version": "0.46.1", | ||
"version": "0.46.2", | ||
"author": "ci010 <[email protected]>", | ||
"description": "A great minecraft launcher in the future", | ||
"license": "MIT", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@xmcl/runtime", | ||
"private": true, | ||
"version": "0.44.4", | ||
"version": "0.44.5", | ||
"author": "ci010 <[email protected]>", | ||
"description": "The runtime for x minecraft launcher in nodejs", | ||
"license": "MIT", | ||
|