-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release restatectl with other binaries * Notarize apple binaries * Add restatectl to cli docker image
- Loading branch information
1 parent
86cd732
commit e5e3c78
Showing
11 changed files
with
198 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Notarize darwin binaries | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
# comes from cargo-dist workflow call | ||
plan: | ||
required: true | ||
type: string | ||
|
||
env: | ||
PLAN: ${{ inputs.plan }} | ||
|
||
jobs: | ||
notarize: | ||
runs-on: warp-macos-latest-arm64-6x | ||
strategy: | ||
matrix: | ||
app_name: | ||
- restate-cli | ||
- restatectl | ||
- restate-server | ||
target: | ||
- aarch64-apple-darwin | ||
- x86_64-apple-darwin | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Download GitHub Artifacts" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: artifacts-*-apple-darwin | ||
merge-multiple: true | ||
|
||
- name: Extract binaries | ||
run: tar -xvzf ${{ matrix.app_name }}-${{ matrix.target }}.tar.xz | ||
|
||
- name: Add notary credentials | ||
run: xcrun notarytool store-credentials --apple-id "$NOTARY_APPLE_ID" --password "$NOTARY_APP_SPECIFIC_PASSWORD" --team-id "$CODESIGN_IDENTITY" "Notarization" | ||
env: | ||
NOTARY_APPLE_ID: ${{ secrets.NOTARY_APPLE_ID }} | ||
NOTARY_APP_SPECIFIC_PASSWORD: ${{ secrets.NOTARY_APP_SPECIFIC_PASSWORD }} | ||
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY }} | ||
|
||
- name: Notarize | ||
shell: bash | ||
run: | | ||
bin="$(echo "$PLAN" | jq -r '.artifacts["${{ matrix.app_name }}-${{ matrix.target }}.tar.xz"].assets[] | select(.kind == "executable").name')" | ||
zip ${{ matrix.app_name }}-${{ matrix.target }}.zip "${{ matrix.app_name }}-${{ matrix.target }}/${bin}" | ||
xcrun notarytool submit ${{ matrix.app_name }}-${{ matrix.target }}.zip --keychain-profile "Notarization" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "@restatedev/restatectl", | ||
"description": "Restate administration tools", | ||
"version": "0.5.1", | ||
"bin": "lib/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/restatedev/restate.git" | ||
}, | ||
"publishConfig": { | ||
"@restatedev:registry": "https://registry.npmjs.org" | ||
}, | ||
"author": "Restate Developers", | ||
"license": "BSL", | ||
"email": "code@restate.dev", | ||
"homepage": "https://github.com/restatedev/restate#readme", | ||
"scripts": { | ||
"typecheck": "tsc --noEmit", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"build": "tsc", | ||
"dev": "npm run build && node lib/index.js" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.11.18", | ||
"@typescript-eslint/eslint-plugin": "^5.48.0", | ||
"@typescript-eslint/parser": "^5.48.0", | ||
"eslint": "^8.31.0", | ||
"typescript": "^4.9.4" | ||
}, | ||
"optionalDependencies": { | ||
"@restatedev/restatectl-linux-x64": "0.5.1", | ||
"@restatedev/restatectl-linux-arm64": "0.5.1", | ||
"@restatedev/restatectl-darwin-x64": "0.5.1", | ||
"@restatedev/restatectl-darwin-arm64": "0.5.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env node | ||
|
||
/* | ||
* Copyright (c) 2023 - 2025 Restate Software, Inc., Restate GmbH. | ||
* All rights reserved. | ||
* | ||
* Use of this software is governed by the Business Source License | ||
* included in the LICENSE file. | ||
* | ||
* As of the Change Date specified in that file, in accordance with | ||
* the Business Source License, use of this software will be governed | ||
* by the Apache License, Version 2.0. | ||
*/ | ||
|
||
import { spawnSync } from "child_process"; | ||
import os from "node:os"; | ||
|
||
function getExePath() { | ||
const arch = os.arch(); | ||
const op = os.platform(); | ||
|
||
try { | ||
return require.resolve( | ||
`@restatedev/restatectl-${op}-${arch}/bin/restatectl`, | ||
); | ||
} catch (e) { | ||
throw new Error( | ||
`Couldn't find application binary inside node_modules for ${op}-${arch}`, | ||
); | ||
} | ||
} | ||
|
||
function run() { | ||
const args = process.argv.slice(2); | ||
const processResult = spawnSync(getExePath(), args, { stdio: "inherit" }); | ||
process.exit(processResult.status ?? 0); | ||
} | ||
|
||
run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2016", | ||
"module": "commonjs", | ||
"esModuleInterop": true, | ||
"baseUrl": "./", | ||
"outDir": "lib", | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"skipLibCheck": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters