Skip to content

Commit

Permalink
Merge pull request #476 from dpkjnr/mac-mx-build
Browse files Browse the repository at this point in the history
add separate release for mac intel in github workflow
  • Loading branch information
dpkjnr authored Aug 20, 2024
2 parents 7dbe730 + f0bfa8f commit 15fec45
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
NEXT_VERSION: "${{ inputs.next-version }}"
outputs:
dmg_filename: "Wallet Recovery Wizard-${{ inputs.next-version }}-arm64.dmg"
dmg_filename_intel: "Wallet Recovery Wizard-${{ inputs.next-version }}.dmg"
exe_filename: "Wallet Recovery Wizard-Setup-${{ inputs.next-version }}.exe"
deb_filename: "Wallet Recovery Wizard-Linux-${{ inputs.next-version }}.deb"
steps:
Expand Down Expand Up @@ -79,6 +80,31 @@ jobs:
path: "release/${{ env.NEXT_VERSION }}/${{ env.DMG_FILENAME }}"
if-no-files-found: "error"

mac-build_intel:
name: Create Mac Intel release
runs-on: macos-13
needs:
- get-current-state
env:
DMG_FILENAME_INTEL: "${{ needs.get-current-state.outputs.dmg_filename_intel }}"
NEXT_VERSION: "${{ inputs.next-version }}"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'
- run: |
sed -i -e 's/0.0.0-placeholder-version/${{ env.NEXT_VERSION }}/g' "package.json"
sed -i -e 's/0.0.0-placeholder-version/${{ env.NEXT_VERSION }}/g' "package-lock.json"
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: "${{ env.DMG_FILENAME_INTEL }}"
path: "release/${{ env.NEXT_VERSION }}/${{ env.DMG_FILENAME_INTEL }}"
if-no-files-found: "error"

windows-linux-build:
name: Create Windows and Linux release
runs-on: ubuntu-latest
Expand Down Expand Up @@ -114,9 +140,11 @@ jobs:
needs:
- get-current-state
- mac-build
- mac-build_intel
- windows-linux-build
env:
DMG_FILENAME: "${{ needs.get-current-state.outputs.dmg_filename }}"
DMG_FILENAME_INTEL: "${{ needs.get-current-state.outputs.dmg_filename_intel }}"
EXE_FILENAME: "${{ needs.get-current-state.outputs.exe_filename }}"
DEB_FILENAME: "${{ needs.get-current-state.outputs.deb_filename }}"
NEXT_VERSION: "${{ inputs.next-version }}"
Expand All @@ -129,6 +157,7 @@ jobs:
- run: |
ls -la
sha256sum "${{ env.DMG_FILENAME }}" > "${{ env.DMG_FILENAME }}.sha256sum"
sha256sum "${{ env.DMG_FILENAME_INTEL }}" > "${{ env.DMG_FILENAME_INTEL }}.sha256sum"
sha256sum "${{ env.DEB_FILENAME }}" > "${{ env.DEB_FILENAME }}.sha256sum"
sha256sum "${{ env.EXE_FILENAME }}" > "${{ env.EXE_FILENAME }}.sha256sum"
Expand Down Expand Up @@ -171,6 +200,28 @@ jobs:
-H "Content-Type: application/octet-stream" \
"${{ steps.get-new-release-id.outputs.new_release_url }}?name=$target_dmg_filename.sha256sum" \
--data-binary "@${{ env.DMG_FILENAME }}.sha256sum"
- name: Add the Mac Intel assets to the release
run: |
target_dmg_filename_intel=$(echo "${{ env.DMG_FILENAME_INTEL }}" | sed 's/\ /\./g')
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
"${{ steps.get-new-release-id.outputs.new_release_url }}?name=$target_dmg_filename_intel" \
--data-binary "@${{ env.DMG_FILENAME_INTEL }}"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
"${{ steps.get-new-release-id.outputs.new_release_url }}?name=$target_dmg_filename_intel.sha256sum" \
--data-binary "@${{ env.DMG_FILENAME_INTEL }}.sha256sum"
- name: Add the Linux assets to the release
run: |
Expand Down

0 comments on commit 15fec45

Please sign in to comment.