Skip to content
Open
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
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
name: release-artifacts

on:
push:
branches: [feat/ci-sign]
release:
types: [created]

jobs:
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
# runs-on: ubuntu-latest
runs-on: macos-11.0
strategy:
fail-fast: false
matrix:
Expand All @@ -25,7 +28,12 @@ jobs:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/rust-build.action@latest
with:
UPLOAD_MODE: none
env:
APPLE_DEVELOPER_CERT: ${{ secrets.APPLE_DEVELOPER_CERT }}
APPLE_DEVELOPER_CERT_PWD: ${{ secrets.APPLE_DEVELOPER_CERT_PWD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
POST_BUILD: ./codesign.apple.bash
13 changes: 13 additions & 0 deletions codesign.apple.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

echo "code sign started"

echo $MACOS_CERTIFICATE | base64 —decode > certificate.p12
security create-keychain -p $APPLE_DEVELOPER_CERT_PWD build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p $APPLE_DEVELOPER_CERT_PWD build.keychain
security import certificate.p12 -k build.keychain -P $$APPLE_DEVELOPER_CERT_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $APPLE_DEVELOPER_CERT_PWD build.keychain
/usr/bin/codesign --force -s $APPLE_DEVELOPER_CERT_PWD ./path/to/you/app -v

echo "code sign done..."