Skip to content
Merged
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
65 changes: 64 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [published]

permissions:
actions: read
id-token: write
contents: write

Expand All @@ -18,6 +19,9 @@ jobs:
# upstream fix (oven-sh/bun#29122).
CLI_BUN_VERSION: '1.3.11'
HOMEBREW_TAP_REPO: appwrite/homebrew-appwrite
WINDOWS_SIGNING_PROJECT_SLUG: ${{ vars.WINDOWS_SIGNING_PROJECT_SLUG || 'sdk-for-cli' }}
WINDOWS_SIGNING_POLICY_SLUG: ${{ vars.WINDOWS_SIGNING_POLICY_SLUG || 'release-signing' }}
WINDOWS_SIGNING_ARTIFACT_CONFIGURATION_SLUG: ${{ vars.WINDOWS_SIGNING_ARTIFACT_CONFIGURATION_SLUG || 'initial' }}
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -29,7 +33,7 @@ jobs:
- name: Setup binfmt with QEMU
run: |
sudo apt update
sudo apt install qemu-system binfmt-support qemu-user-static
sudo apt install qemu-system binfmt-support qemu-user-static osslsigncode
update-binfmts --display

- name: Setup ldid
Expand All @@ -49,6 +53,65 @@ jobs:
bun run windows-x64
bun run windows-arm64

- name: Upload unsigned Windows binaries
id: upload-windows-unsigned
uses: actions/upload-artifact@v4
with:
name: windows-unsigned
path: |
build/appwrite-cli-win-x64.exe
build/appwrite-cli-win-arm64.exe

- name: Submit Windows binaries for signing
uses: signpath/github-action-submit-signing-request@b9d91eadd323de506c0c81cf0c7fe7438f3360fd # v2
with:
api-token: ${{ secrets.WINDOWS_SIGNING_API_TOKEN }}
organization-id: ${{ vars.WINDOWS_SIGNING_ORGANIZATION_ID }}
project-slug: ${{ env.WINDOWS_SIGNING_PROJECT_SLUG }}
signing-policy-slug: ${{ env.WINDOWS_SIGNING_POLICY_SLUG }}
artifact-configuration-slug: ${{ env.WINDOWS_SIGNING_ARTIFACT_CONFIGURATION_SLUG }}
github-artifact-id: ${{ steps.upload-windows-unsigned.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: build-signed
parameters: |
version: ${{ github.event.release.tag_name }}

- name: Replace unsigned Windows binaries
run: |
set -euo pipefail

signed_x64="$(find build-signed -type f -name 'appwrite-cli-win-x64.exe' -print -quit)"
signed_arm64="$(find build-signed -type f -name 'appwrite-cli-win-arm64.exe' -print -quit)"

if [ -z "$signed_x64" ] || [ -z "$signed_arm64" ]; then
echo "Signed Windows binaries were not found in build-signed"
find build-signed -type f -print
exit 1
fi

cp "$signed_x64" build/appwrite-cli-win-x64.exe
cp "$signed_arm64" build/appwrite-cli-win-arm64.exe
Comment thread
ChiragAgg5k marked this conversation as resolved.

- name: Verify Windows signatures
run: |
set -euo pipefail

verify_signature() {
local file="$1"
local output

output="$(osslsigncode verify -in "$file" 2>&1)"
echo "$output"

if ! grep -Fq "Succeeded" <<< "$output"; then
echo "$file signature verification failed"
exit 1
fi
}

verify_signature build/appwrite-cli-win-x64.exe
verify_signature build/appwrite-cli-win-arm64.exe

- name: Setup Node.js
uses: actions/setup-node@v6
with:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 20.2.0-rc.1

* Added: Code-signed Windows release binaries (`appwrite-cli-win-x64.exe` and `appwrite-cli-win-arm64.exe`) via SignPath

## 20.1.0

* Added `--switch` and `--new` flags on `appwrite login` to explicitly manage multiple saved accounts
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using

```sh
$ appwrite -v
20.1.0
20.2.0-rc.1
```

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

## Getting Started
Expand Down
34 changes: 17 additions & 17 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# You can use "View source" of this page to see the full script.

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

$APPWRITE_BINARY_NAME = "appwrite.exe"

Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ verifyMacOSCodeSignature() {
downloadBinary() {
echo "[2/5] Downloading executable for $OS ($ARCH) ..."

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

Expand Down
4 changes: 1 addition & 3 deletions lib/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ const printInitProjectNextSteps = (steps: InitProjectNextStep[]): void => {

for (const step of steps) {
const spacing = " ".repeat(longestCommand - step.command.length + 4);
console.log(
` ${chalk.cyan(step.command)}${spacing}${step.description}`,
);
console.log(` ${chalk.cyan(step.command)}${spacing}${step.description}`);
}
};

Expand Down
Loading