Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/check_checksums.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Check Checksums

on:
on:
release:
types: [published, prereleased]

Expand All @@ -13,13 +13,13 @@ jobs:
uses: actions/checkout@v2

- name: Generate checksums from artifacts
run:
run:
ruby ./scripts/release-checksums.rb ${{ github.event.release.tag_name }} | tee generated_checksums.txt

- name: Fetch checksums from release note
run: |
curl "https://api.github.com/repos/nervosnetwork/neuron/releases/tags/${{ github.event.release.tag_name }}" |\
python3 -c "import sys, json; print(\"\n\".join(json.load(sys.stdin)['body'].splitlines()[-9:]))" |\
python3 -c "import sys, json; print(\"\n\".join(json.load(sys.stdin)['body'].splitlines()[-11:]))" |\
tee release_note_checksums.txt

- name: Compare
Expand All @@ -30,7 +30,7 @@ jobs:
body=$(cat generated_checksums.txt)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body

- uses: peter-evans/commit-comment@v1
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,28 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: Neuron-Mac
path: release/Neuron-*-mac.zip
path: release/Neuron-*-mac-x64.zip

- name: Upload Neuron App Zip(arm64)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: Neuron-Mac
path: release/Neuron-*-mac-arm64.zip

- name: Upload Neuron Dmg
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: Neuron-Dmg
path: release/Neuron-*.dmg
path: release/Neuron-*-x64.dmg

- name: Upload Neuron Dmg(arm64)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: Neuron-Dmg
path: release/Neuron-*-arm64.dmg

- name: Upload Neuron Win
if: matrix.os == 'windows-2019'
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/package_for_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,28 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: Neuron-Mac
path: release/Neuron-*-mac.zip
path: release/Neuron-*-mac-x64.zip

- name: Upload Neuron App Zip(arm64)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: Neuron-Mac
path: release/Neuron-*-mac-arm64.zip

- name: Upload Neuron Dmg
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: Neuron-Dmg
path: release/Neuron-*.dmg
path: release/Neuron-*-x64.dmg

- name: Upload Neuron Dmg(arm64)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: Neuron-Dmg
path: release/Neuron-*-arm64.dmg

- name: Upload Neuron Win
if: matrix.os == 'windows-2019'
Expand Down
10 changes: 6 additions & 4 deletions packages/neuron-wallet/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ nsis:

dmg:
sign: false
artifactName: "${productName}-v${version}.${ext}"
artifactName: "${productName}-v${version}-${arch}.${ext}"

win:
verifyUpdateCodeSignature: false
Expand All @@ -48,7 +48,7 @@ win:
- x64

mac:
artifactName: "${productName}-v${version}-${os}.${ext}"
artifactName: "${productName}-v${version}-${os}-${arch}.${ext}"
category: public.app-category.finance
icon: assets/icons/icon.icns
extraFiles:
Expand All @@ -62,8 +62,10 @@ mac:
entitlementsInherit: assets/entitlements.plist
electronLanguages: ["en", "zh", "zh_CN", "zh_TW"]
target:
- dmg
- zip
- target: default
arch:
- arm64
- x64

linux:
artifactName: "${productName}-v${version}-${arch}.${ext}"
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"devtron": "1.4.0",
"electron": "16.2.8",
"electron-build-env": "0.2.0",
"electron-builder": "22.14.13",
"electron-builder": "23.6.0",
"electron-devtools-installer": "2.2.4",
"electron-notarize": "0.3.0",
"eslint": "8.25.0",
Expand Down
17 changes: 12 additions & 5 deletions scripts/release-checksums.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@
tag = ARGV[0]

windows_exe = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-setup.exe"
macos_zip = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-mac.zip"
macos_dmg = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}.dmg"

macos_x64_zip = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-mac-x64.zip"
macos_arm64_zip = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-mac-arm64.zip"

macos_x64_dmg = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-x64.dmg"
macos_arm64_dmg = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-arm64.dmg"

linux_appimage = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-x86_64.AppImage"

def get_sha256_checksum(url)
content = URI.open(url).read
Digest::SHA256.hexdigest(content)
end

windows_exe_sha256, macos_zip_sha256, macos_dmg_sha256, linux_appimage_sha256 = [windows_exe, macos_zip, macos_dmg, linux_appimage].map do |url|
windows_exe_sha256, macos_x64_zip_sha256, macos_arm64_zip_sha256, macos_x64_dmg_sha256, macos_arm64_dmg_sha256, linux_appimage_sha256 = [windows_exe, macos_x64_zip, macos_arm64_zip, macos_x64_dmg, macos_arm64_dmg, linux_appimage].map do |url|
Thread.new { get_sha256_checksum(url) }
end.map(&:value)

Expand All @@ -25,8 +30,10 @@ def get_sha256_checksum(url)
OS | Arch | Package | SHA256 Checksum
-- | -- | -- | --
Windows | x64 | [exe](#{windows_exe}) | <code>#{windows_exe_sha256}</code>
macOS | x64 | [zip](#{macos_zip}) | <code>#{macos_zip_sha256}</code>
macOS | x64 | [DMG](#{macos_dmg}) | <code>#{macos_dmg_sha256}</code>
macOS | x64 | [zip](#{macos_x64_zip}) | <code>#{macos_x64_zip_sha256}</code>
macOS | arm64 | [zip](#{macos_arm64_zip}) | <code>#{macos_arm64_zip_sha256}</code>
macOS | x64 | [DMG](#{macos_x64_dmg}) | <code>#{macos_x64_dmg_sha256}</code>
macOS | arm64 | [DMG](#{macos_arm64_dmg}) | <code>#{macos_arm64_dmg_sha256}</code>
Linux | x64 | [AppImage](#{linux_appimage}) | <code>#{linux_appimage_sha256}</code>
Comment thread
Keith-CY marked this conversation as resolved.
)

Expand Down
Loading