Skip to content

Commit 66bfb48

Browse files
authored
feat: Command Line SDK 20.2.0-rc.1 (#312)
1 parent 6272056 commit 66bfb48

13 files changed

Lines changed: 201 additions & 128 deletions

File tree

.github/workflows/publish.yml

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
types: [published]
66

77
permissions:
8+
actions: read
89
id-token: write
910
contents: write
1011

@@ -18,6 +19,9 @@ jobs:
1819
# upstream fix (oven-sh/bun#29122).
1920
CLI_BUN_VERSION: '1.3.11'
2021
HOMEBREW_TAP_REPO: appwrite/homebrew-appwrite
22+
WINDOWS_SIGNING_PROJECT_SLUG: ${{ vars.WINDOWS_SIGNING_PROJECT_SLUG || 'sdk-for-cli' }}
23+
WINDOWS_SIGNING_POLICY_SLUG: ${{ vars.WINDOWS_SIGNING_POLICY_SLUG || 'release-signing' }}
24+
WINDOWS_SIGNING_ARTIFACT_CONFIGURATION_SLUG: ${{ vars.WINDOWS_SIGNING_ARTIFACT_CONFIGURATION_SLUG || 'initial' }}
2125
steps:
2226
- uses: actions/checkout@v6
2327
with:
@@ -29,7 +33,7 @@ jobs:
2933
- name: Setup binfmt with QEMU
3034
run: |
3135
sudo apt update
32-
sudo apt install qemu-system binfmt-support qemu-user-static
36+
sudo apt install qemu-system binfmt-support qemu-user-static osslsigncode
3337
update-binfmts --display
3438
3539
- name: Setup ldid
@@ -49,6 +53,65 @@ jobs:
4953
bun run windows-x64
5054
bun run windows-arm64
5155
56+
- name: Upload unsigned Windows binaries
57+
id: upload-windows-unsigned
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: windows-unsigned
61+
path: |
62+
build/appwrite-cli-win-x64.exe
63+
build/appwrite-cli-win-arm64.exe
64+
65+
- name: Submit Windows binaries for signing
66+
uses: signpath/github-action-submit-signing-request@b9d91eadd323de506c0c81cf0c7fe7438f3360fd # v2
67+
with:
68+
api-token: ${{ secrets.WINDOWS_SIGNING_API_TOKEN }}
69+
organization-id: ${{ vars.WINDOWS_SIGNING_ORGANIZATION_ID }}
70+
project-slug: ${{ env.WINDOWS_SIGNING_PROJECT_SLUG }}
71+
signing-policy-slug: ${{ env.WINDOWS_SIGNING_POLICY_SLUG }}
72+
artifact-configuration-slug: ${{ env.WINDOWS_SIGNING_ARTIFACT_CONFIGURATION_SLUG }}
73+
github-artifact-id: ${{ steps.upload-windows-unsigned.outputs.artifact-id }}
74+
wait-for-completion: true
75+
output-artifact-directory: build-signed
76+
parameters: |
77+
version: ${{ github.event.release.tag_name }}
78+
79+
- name: Replace unsigned Windows binaries
80+
run: |
81+
set -euo pipefail
82+
83+
signed_x64="$(find build-signed -type f -name 'appwrite-cli-win-x64.exe' -print -quit)"
84+
signed_arm64="$(find build-signed -type f -name 'appwrite-cli-win-arm64.exe' -print -quit)"
85+
86+
if [ -z "$signed_x64" ] || [ -z "$signed_arm64" ]; then
87+
echo "Signed Windows binaries were not found in build-signed"
88+
find build-signed -type f -print
89+
exit 1
90+
fi
91+
92+
cp "$signed_x64" build/appwrite-cli-win-x64.exe
93+
cp "$signed_arm64" build/appwrite-cli-win-arm64.exe
94+
95+
- name: Verify Windows signatures
96+
run: |
97+
set -euo pipefail
98+
99+
verify_signature() {
100+
local file="$1"
101+
local output
102+
103+
output="$(osslsigncode verify -in "$file" 2>&1)"
104+
echo "$output"
105+
106+
if ! grep -Fq "Succeeded" <<< "$output"; then
107+
echo "$file signature verification failed"
108+
exit 1
109+
fi
110+
}
111+
112+
verify_signature build/appwrite-cli-win-x64.exe
113+
verify_signature build/appwrite-cli-win-arm64.exe
114+
52115
- name: Setup Node.js
53116
uses: actions/setup-node@v6
54117
with:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 20.2.0-rc.1
4+
5+
* Added: Code-signed Windows release binaries (`appwrite-cli-win-x64.exe` and `appwrite-cli-win-arm64.exe`) via SignPath
6+
37
## 20.1.0
48

59
* Added `--switch` and `--new` flags on `appwrite login` to explicitly manage multiple saved accounts

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
2929

3030
```sh
3131
$ appwrite -v
32-
20.1.0
32+
20.2.0-rc.1
3333
```
3434

3535
### Install using prebuilt binaries
@@ -83,7 +83,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
8383
Once the installation completes, you can verify your install using
8484
```
8585
$ appwrite -v
86-
20.1.0
86+
20.2.0-rc.1
8787
```
8888

8989
## Getting Started

bun.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# You can use "View source" of this page to see the full script.
1414

1515
# REPO
16-
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/20.1.0/appwrite-cli-win-x64.exe"
17-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/20.1.0/appwrite-cli-win-arm64.exe"
16+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/20.2.0-rc.1/appwrite-cli-win-x64.exe"
17+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/20.2.0-rc.1/appwrite-cli-win-arm64.exe"
1818

1919
$APPWRITE_BINARY_NAME = "appwrite.exe"
2020

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ verifyMacOSCodeSignature() {
120120
downloadBinary() {
121121
echo "[2/5] Downloading executable for $OS ($ARCH) ..."
122122

123-
GITHUB_LATEST_VERSION="20.1.0"
123+
GITHUB_LATEST_VERSION="20.2.0-rc.1"
124124
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
125125
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
126126

lib/commands/init.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ const printInitProjectNextSteps = (steps: InitProjectNextStep[]): void => {
136136

137137
for (const step of steps) {
138138
const spacing = " ".repeat(longestCommand - step.command.length + 4);
139-
console.log(
140-
` ${chalk.cyan(step.command)}${spacing}${step.description}`,
141-
);
139+
console.log(` ${chalk.cyan(step.command)}${spacing}${step.description}`);
142140
}
143141
};
144142

0 commit comments

Comments
 (0)