From 6a1fff8c0bfd713ac494d7c55b9057e885f4f0fb Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 30 Sep 2023 21:58:58 +0100 Subject: [PATCH 01/10] release --- .github/workflows/release.yml | 50 +++++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- parachain/node/Cargo.toml | 2 +- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..93a894565 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: Release + +on: + workflow_dispatch: + +jobs: + build_and_publish: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v3 + with: + token: ${{ secrets.GH_TOKEN }} + submodules: recursive + + - uses: webfactory/ssh-agent@v0.5.4 + 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: Build + run: | + cargo +nightly build --release -p hyperbridge + 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:$(cargo get package.version --entry ./parachain/node) -t polytopelabs/hyperbridge:latest -f ./scripts/docker/slim.Dockerfile . + + - name: Docker Push + run: | + docker push polytopelabs/hyperbridge:$(cargo get package.version --entry ./parachain/node) + docker push polytopelabs/hyperbridge:latest diff --git a/Cargo.lock b/Cargo.lock index c1a529a06..df43529c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4834,7 +4834,7 @@ dependencies = [ [[package]] name = "hyperbridge" -version = "0.1.0" +version = "0.1.1" dependencies = [ "clap", "cumulus-client-cli", diff --git a/parachain/node/Cargo.toml b/parachain/node/Cargo.toml index b4a4deed3..651129000 100644 --- a/parachain/node/Cargo.toml +++ b/parachain/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hyperbridge" -version = "0.1.0" +version = "0.1.1" authors = ["Polytope Labs "] description = "The Hyperbridge parachain node" edition = "2021" From b1b295744bc810e92400e78e587e647be3d540e1 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 30 Sep 2023 22:10:29 +0100 Subject: [PATCH 02/10] run on release-runner --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 93a894565..9a25ca89c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,9 +3,13 @@ name: Release on: workflow_dispatch: +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + jobs: build_and_publish: - runs-on: ubuntu-latest + runs-on: release-runner steps: - name: Checkout sources uses: actions/checkout@v3 From 2513676daceb3ae6874c76e98dd46781ff5c45ac Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 30 Sep 2023 22:26:08 +0100 Subject: [PATCH 03/10] v0.1.2 --- .github/workflows/release.yml | 1 - parachain/node/Cargo.toml | 2 +- scripts/docker/slim.Dockerfile | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a25ca89c..6505b435d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,6 @@ jobs: - name: Build run: | cargo +nightly build --release -p hyperbridge - mv ./target/release/hyperbridge ./ - name: Install Cargo get run: cargo install cargo-get diff --git a/parachain/node/Cargo.toml b/parachain/node/Cargo.toml index 651129000..22068856f 100644 --- a/parachain/node/Cargo.toml +++ b/parachain/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hyperbridge" -version = "0.1.1" +version = "0.1.2" authors = ["Polytope Labs "] description = "The Hyperbridge parachain node" edition = "2021" diff --git a/scripts/docker/slim.Dockerfile b/scripts/docker/slim.Dockerfile index 5fba511e4..69f07e3dc 100644 --- a/scripts/docker/slim.Dockerfile +++ b/scripts/docker/slim.Dockerfile @@ -2,7 +2,7 @@ FROM docker.io/library/debian:bullseye-slim WORKDIR / -COPY ./hyperbridge ./ +COPY ./target/release/hyperbridge ./ ENTRYPOINT ["./hyperbridge"] \ No newline at end of file From a12fdce9da091339a72e4d363c54bc288696688d Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 30 Sep 2023 22:34:57 +0100 Subject: [PATCH 04/10] install wasm toolchain --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6505b435d..b3e9f2656 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,9 @@ jobs: with: toolchain: nightly + - uses: Swatinem/rust-cache@v1 + - run: rustup target add wasm32-unknown-unknown + - name: Build run: | cargo +nightly build --release -p hyperbridge From bf0c1b55f5d698f58d17d0bff1e6d293f1d87343 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 30 Sep 2023 22:35:26 +0100 Subject: [PATCH 05/10] install wasm toolchain --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index efb6c0789..5c7f4d919 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: with: toolchain: nightly - uses: Swatinem/rust-cache@v1 - - run: rustup target add wasm32-unknown-unknown + - run: rustup target add wasm32-unknown-unknown --toolchain nightly - name: Install Protoc uses: arduino/setup-protoc@v1 with: From a291f40c862f0ce38a2abb7cfe36417854e0655e Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 30 Sep 2023 22:36:53 +0100 Subject: [PATCH 06/10] bump spec_version --- parachain/runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parachain/runtime/src/lib.rs b/parachain/runtime/src/lib.rs index ad6c6074e..2d735ecfb 100644 --- a/parachain/runtime/src/lib.rs +++ b/parachain/runtime/src/lib.rs @@ -193,7 +193,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("hyperbridge"), impl_name: create_runtime_str!("hyperbridge"), authoring_version: 1, - spec_version: 100, + spec_version: 101, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From 1abc6308074f7ba588ec1370be7f73f896d8a874 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 30 Sep 2023 22:42:01 +0100 Subject: [PATCH 07/10] move binary --- .github/workflows/release.yml | 1 + scripts/docker/slim.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3e9f2656..1afcd437d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,7 @@ jobs: - name: Build run: | cargo +nightly build --release -p hyperbridge + mv ./target/release/hyperbridge ./ - name: Install Cargo get run: cargo install cargo-get diff --git a/scripts/docker/slim.Dockerfile b/scripts/docker/slim.Dockerfile index 69f07e3dc..5fba511e4 100644 --- a/scripts/docker/slim.Dockerfile +++ b/scripts/docker/slim.Dockerfile @@ -2,7 +2,7 @@ FROM docker.io/library/debian:bullseye-slim WORKDIR / -COPY ./target/release/hyperbridge ./ +COPY ./hyperbridge ./ ENTRYPOINT ["./hyperbridge"] \ No newline at end of file From 578233773c1043f73d61a3e62cd8c61d276c49e2 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 30 Sep 2023 22:52:32 +0100 Subject: [PATCH 08/10] bump Cargo.lock --- .github/workflows/release.yml | 4 ++-- Cargo.lock | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1afcd437d..68ffbec32 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,9 +49,9 @@ jobs: password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - name: Build the Docker image - run: docker build -t polytopelabs/hyperbridge:$(cargo get package.version --entry ./parachain/node) -t polytopelabs/hyperbridge:latest -f ./scripts/docker/slim.Dockerfile . + 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:$(cargo get package.version --entry ./parachain/node) + docker push polytopelabs/hyperbridge:v$(cargo get package.version --entry ./parachain/node) docker push polytopelabs/hyperbridge:latest diff --git a/Cargo.lock b/Cargo.lock index df43529c1..266eec51d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4834,7 +4834,7 @@ dependencies = [ [[package]] name = "hyperbridge" -version = "0.1.1" +version = "0.1.2" dependencies = [ "clap", "cumulus-client-cli", From 4b6221c5414209aee7307e3e5abcaa2be24567b8 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 30 Sep 2023 22:55:36 +0100 Subject: [PATCH 09/10] remove rust-cache --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68ffbec32..c3de1f3ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,8 +31,8 @@ jobs: with: toolchain: nightly - - uses: Swatinem/rust-cache@v1 - - run: rustup target add wasm32-unknown-unknown + - name: Add wasm toolchain + run: rustup target add wasm32-unknown-unknown - name: Build run: | From 90918f9ae7e6ed5dafb4739cc0e4fe7b3c682a35 Mon Sep 17 00:00:00 2001 From: David Salami Date: Sun, 1 Oct 2023 09:05:32 +0100 Subject: [PATCH 10/10] build goerli --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3de1f3ee..d93fea63d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: - name: Build run: | - cargo +nightly build --release -p hyperbridge + cargo +nightly build --release -p hyperbridge --features goerli mv ./target/release/hyperbridge ./ - name: Install Cargo get