Skip to content

Set fixed version number for substrate-bip39 to 0.4.5 #45

Set fixed version number for substrate-bip39 to 0.4.5

Set fixed version number for substrate-bip39 to 0.4.5 #45

Workflow file for this run

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
env:
REGISTRY: ghcr.io
IMAGE_NAME_RELAY: threefoldtech/rmb-relay
IMAGE_NAME_PEER: threefoldtech/rmb-peer
jobs:
build:
name: Releasing rmb
runs-on: ubuntu-20.04
steps:
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install musl-dev musl-tools
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
sudo unzip -d /usr/local protoc-21.12-linux-x86_64.zip
- name: Checkout code
uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
name: Install toolchain
with:
toolchain: stable
target: x86_64-unknown-linux-musl
- uses: actions-rs/cargo@v1
name: Build release
with:
command: build
args: |
--release
--target=x86_64-unknown-linux-musl
- name: Strip
run: |
strip target/x86_64-unknown-linux-musl/release/rmb-relay
strip target/x86_64-unknown-linux-musl/release/rmb-peer
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/x86_64-unknown-linux-musl/release/rmb-relay
target/x86_64-unknown-linux-musl/release/rmb-peer
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for relay Docker
id: meta_relay
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_RELAY }}
- name: Extract metadata (tags, labels) for peer Docker
id: meta_peer
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_PEER }}
- name: Copy build files for docker
run: |
mkdir -p /tmp/relay /tmp/peer
cp ./build/relay/Dockerfile /tmp/relay
cp ./target/x86_64-unknown-linux-musl/release/rmb-relay /tmp/relay
cp ./build/peer/Dockerfile /tmp/peer
cp ./target/x86_64-unknown-linux-musl/release/rmb-peer /tmp/peer
- name: Build and push Docker image for rmb-relay
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: /tmp/relay
push: true
tags: ${{ steps.meta_relay.outputs.tags }}
labels: ${{ steps.meta_relay.outputs.labels }}
- name: Build and push Docker image for rmb-peer
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: /tmp/peer
push: true
tags: ${{ steps.meta_peer.outputs.tags }}
labels: ${{ steps.meta_peer.outputs.labels }}