-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (41 loc) · 1.49 KB
/
release-icp-cli.yaml
File metadata and controls
52 lines (41 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Release (ICP-CLI)
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: production-icp
cancel-in-progress: true
jobs:
deploy-ic:
name: "Deploy to IC"
runs-on: ubuntu-latest
environment:
name: production
url: ${{ steps.get-url.outputs.url }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup-deno
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 22
- name: Install ICP-CLI
run: npm install -g @icp-sdk/icp-cli@0.2.3 @icp-sdk/ic-wasm@0.9.10
- name: Setup Identity
run: |
mkdir -p ~/.local/share/icp-cli/identity/keys
printf '%s' "$ICP_IDENTITY_DEPLOY" | base64 -d > ~/.local/share/icp-cli/identity/keys/deploy.pem
sed -i 's/\\r\\n/\r\n/g' ~/.local/share/icp-cli/identity/keys/deploy.pem
icp identity import deploy --from-pem ~/.local/share/icp-cli/identity/keys/deploy.pem --storage plaintext
icp identity default deploy
echo "deploy identity: $(icp identity principal)"
env:
ICP_IDENTITY_DEPLOY: ${{ secrets.ICP_IDENTITY_DEPLOY }}
- name: Deploy to Mainnet
run: icp deploy docs -e ic
- name: Get URL
id: get-url
run: |
URL="https://$(jq -r '.docs' "$GITHUB_WORKSPACE/.icp/data/mappings/ic.ids.json").icp0.io"
echo "url=$URL" >> $GITHUB_OUTPUT