-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 1.38 KB
/
deploy-tag.yml
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
name: Deploy contract of exact Version
run-name: Deploy contract `${{ inputs.tag }}` version to `${{ inputs.environment }}` by @${{ github.actor }}
on:
workflow_dispatch:
inputs:
environment:
description: "Environment to deploy to"
type: environment
required: true
tag:
description: "The tag version of release (v0.1.0)"
required: true
type: string
jobs:
deploy-tag:
name: Deploy ${{ inputs.tag }} to ${{ inputs.environment }}
environment: ${{ inputs.environment }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository to ${{ inputs.tag }}
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
fetch-tags: true
fetch-depth: 0
- name: Install cargo-near CLI
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.6.1/cargo-near-installer.sh | sh
- name: Deploy contract to ${{ vars.NEAR_ACCOUNT_ID }}
run: |
cargo near deploy --no-abi "${{ vars.NEAR_ACCOUNT_ID }}" \
without-init-call \
network-config "${{ vars.NEAR_NETWORK }}" \
sign-with-plaintext-private-key \
--signer-public-key "${{ vars.NEAR_ACCOUNT_PUBLIC_KEY }}" \
--signer-private-key "${{ secrets.NEAR_ACCOUNT_PRIVATE_KEY }}" \
send