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"