-
Notifications
You must be signed in to change notification settings - Fork 47
57 lines (45 loc) · 1.55 KB
/
release.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Release
on:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_publish:
runs-on: release-runner
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive
- uses: webfactory/[email protected]
with:
ssh-private-key: "${{ secrets.SSH_KEY }}"
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.9.1'
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
- name: Add wasm toolchain
run: rustup target add wasm32-unknown-unknown
- name: Build
run: |
cargo +nightly build --release -p hyperbridge --features goerli
mv ./target/release/hyperbridge ./
- name: Install Cargo get
run: cargo install cargo-get
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build the Docker image
run: docker build -t polytopelabs/hyperbridge:v$(cargo get package.version --entry ./parachain/node) -t polytopelabs/hyperbridge:latest -f ./scripts/docker/slim.Dockerfile .
- name: Docker Push
run: |
docker push polytopelabs/hyperbridge:v$(cargo get package.version --entry ./parachain/node)
docker push polytopelabs/hyperbridge:latest