Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteregrets committed Dec 5, 2024
1 parent 6b0b04b commit 5607a5a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: exit 1
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
lint:
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,3 +59,30 @@ jobs:
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
- name: Check Cargo.toml sorting
run: cargo sort --workspace --check
- name: Create pem and certificate.der files
run: |
echo "${{ secrets.MACOS_PEM }}" | base64 -d -o macos.pem
echo "${{ secrets.MACOS_CERTIFICATE_DER }}" | base64 -d -o certificate.der
- name: Sign macos binary
uses: indygreg/apple-code-sign-action@v1
with:
input_path: target/debug/s2
pem_file: macos.pem
certificate_der_file: certificate.der
sign: true
sign_args: "--code-signature-flags=runtime"
- name: Prepare artifacts
shell: bash
run: |
cd target/debug
zip -r ../../../s2.zip s2
- name: App store connect api key
run: echo "${{ secrets.APP_STORE_CONNECT_API_KEY }}" > app_store_connect_api_key.json
- name: Notarize macos binary
uses: indygreg/apple-notarize-action@v1
with:
input_path: target/debug/s2
sign: false
notarize: true
app_store_connect_api_key_json_file: app_store_connect_api_key.json
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,18 @@ jobs:
git config --global --add url."https://${{ secrets.GH_TOKEN }}:x-oauth-basic@github".insteadOf ssh://git@github
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Create pem and certificate.der files
if: matrix.os == 'macos-latest'
run: |
echo "${{ secrets.MACOS_PEM }}" | base64 -d -o macos.pem
echo "${{ secrets.MACOS_CERTIFICATE_DER }}" | base64 -d -o certificate.der
- name: Sign macos binary
if: matrix.os == 'macos-latest'
uses: indygreg/apple-code-sign-action@v1
with:
input_path: target/${{ matrix.target }}/release/s2
pem_file: ${{ secrets.MACOS_PEM_FILE }}
certificate_der_file: ${{ secrets.MACOS_CERTIFICATE_DER_FILE }}
pem_file: macos.pem
certificate_der_file: certificate.der
sign: true
sign_args: "--code-signature-flags=runtime"
- name: Prepare artifacts
Expand Down

0 comments on commit 5607a5a

Please sign in to comment.