Skip to content

Commit

Permalink
Merge pull request mac-cain13#694 from mac-cain13/architectures
Browse files Browse the repository at this point in the history
Native M1 build with Fat binaries
  • Loading branch information
tomlokhorst authored Nov 17, 2021
2 parents b52f50b + 91675fd commit 8607e84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: '*'

env:
DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer

jobs:
unit-tests:
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: created

env:
DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer

jobs:
release-build:
Expand Down Expand Up @@ -33,24 +33,26 @@ jobs:
asset_name: rswift-${{ github.event.release.tag_name }}-source.tar.gz
asset_content_type: application/tar+gzip

- name: Build
run: swift build -v -c release
- name: Build fat binary
run: |
swift build -c release --arch x86_64 --arch arm64
- name: Import Signing Certificates
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.APPLE_CERTS }}
p12-password: ${{ secrets.APPLE_CERTS_PASSWORD }}
- name: Code Sign
run: |
codesign --force --options runtime --sign 'Developer ID Application: Mathijs Kadijk (5Z49PA849J)' .build/release/rswift
codesign --force --options runtime --sign 'Developer ID Application: Mathijs Kadijk (5Z49PA849J)' .build/apple/Products/Release/rswift
- name: Store build artifact
uses: actions/upload-artifact@v1
with:
name: rswift-${{ github.event.release.tag_name }}
path: .build/release/rswift
path: .build/apple/Products/Release/rswift

- name: Archive ZIP
run: zip --junk-paths ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip .build/release/rswift License
run: zip --junk-paths ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip .build/apple/Products/Release/rswift License
- name: Notarize ZIP
run: |
sh notarize.sh
Expand Down Expand Up @@ -81,7 +83,7 @@ jobs:
- name: Archive PKG
run: |
mkdir -p $PKG_ROOT/$BINARY_ROOT
cp .build/release/rswift $PKG_ROOT/$BINARY_ROOT
cp .build/apple/Products/Release/rswift $PKG_ROOT/$BINARY_ROOT
pkgbuild --root $PKG_ROOT --identifier "nl.mathijskadijk.rswift" --version $TAG_NAME --install-location "/" --sign "Developer ID Installer: Mathijs Kadijk (5Z49PA849J)" $FILENAME
env:
TAG_NAME: ${{ github.event.release.tag_name }}
Expand Down

0 comments on commit 8607e84

Please sign in to comment.