Skip to content

Commit

Permalink
ci: add arch to macos dmg name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Oct 22, 2024
1 parent d63cb85 commit 015eeb6
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 47 deletions.
55 changes: 18 additions & 37 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ concurrency:
cancel-in-progress: true

jobs:
mac-arm64:
mac:
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
strategy:
fail-fast: false
matrix:
app: [hostd, renterd, walletd]
arch: [arm64, amd64]
runs-on: macos-latest
defaults:
run:
Expand Down Expand Up @@ -65,7 +66,7 @@ jobs:
run: npm run build
shell: bash
- name: Download daemon binary
run: npm run download:binary -- --goos=darwin --goarch=arm64
run: npm run download:binary -- --goos=darwin --goarch=${{ matrix.arch }}
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -74,45 +75,20 @@ jobs:
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_API_KEY_PATH: ${{ env.APPLE_API_KEY_PATH }}
run: npm run make -- --arch=arm64
shell: bash
linux-arm64:
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
strategy:
fail-fast: false
matrix:
app: [hostd, renterd, walletd]
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.app }}
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/daemon-setup
with:
daemon: ${{ matrix.app }}
node_version: 20.10.0
- name: Lint
run: npm run lint
shell: bash
- name: Build
run: npm run build
shell: bash
- name: Download daemon binary
run: npm run download:binary -- --goos=linux --goarch=arm64
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package executable bundles, make distributables
run: npm run make -- --arch=arm64
run: |
APP_ARCH=${{ matrix.arch }}
if [ $APP_ARCH = "amd64" ]; then
APP_ARCH=x64
fi
npm run make -- --arch=$APP_ARCH
shell: bash
linux-amd64:
linux:
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
strategy:
fail-fast: false
matrix:
app: [hostd, renterd, walletd]
arch: [arm64, amd64]
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -131,12 +107,17 @@ jobs:
run: npm run build
shell: bash
- name: Download daemon binary
run: npm run download:binary -- --goos=linux --goarch=amd64
run: npm run download:binary -- --goos=linux --goarch=${{ matrix.arch }}
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package executable bundles, make distributables
run: npm run make -- --arch=x64
run: |
APP_ARCH=${{ matrix.arch }}
if [ $APP_ARCH = "amd64" ]; then
APP_ARCH=x64
fi
npm run make -- --arch=$APP_ARCH
shell: bash
windows-amd64:
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
app: [hostd, renterd, walletd]
arch: [amd64, arm64]
arch: [arm64, amd64]
runs-on: macos-latest
defaults:
run:
Expand Down
6 changes: 3 additions & 3 deletions hostd/forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ module.exports = {
{
name: '@electron-forge/maker-dmg',
platforms: ['darwin'],
config: {
name: 'hostd',
config: (arch) => ({
name: `hostd-${arch}`,
icon: './assets/icons/icon.icns',
format: 'ULFO',
},
}),
},
{
name: '@electron-forge/maker-deb',
Expand Down
6 changes: 3 additions & 3 deletions renterd/forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ module.exports = {
{
name: '@electron-forge/maker-dmg',
platforms: ['darwin'],
config: {
name: 'renterd',
config: (arch) => ({
name: `renterd-${arch}`,
icon: './assets/icons/icon.icns',
format: 'ULFO',
},
}),
},
{
name: '@electron-forge/maker-deb',
Expand Down
8 changes: 5 additions & 3 deletions walletd/forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ module.exports = {
{
name: '@electron-forge/maker-dmg',
platforms: ['darwin'],
config: {
name: 'walletd',
config: (arch) => {
return ({
name: `walletd-${arch}`,
icon: './assets/icons/icon.icns',
format: 'ULFO',
},
})
},
},
{
name: '@electron-forge/maker-deb',
Expand Down

0 comments on commit 015eeb6

Please sign in to comment.