Skip to content

Prepare code for v0.23.0 release #29

Prepare code for v0.23.0 release

Prepare code for v0.23.0 release #29

name: Build + Release docker
on:
push:
tags:
- 'v*'
jobs:
rust_build:
name: Build Nimiq with release flag
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build binaries in release mode
run: |
cargo build --release
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: nimiq-dist
path: |
target/release/nimiq-client
target/release/nimiq-bls
target/release/nimiq-address
target/release/nimiq-rpc
build_docker:
runs-on: ubuntu-22.04
name: Build & publish docker image
needs: rust_build
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download nimiq client artifact from previous job
uses: actions/download-artifact@v4
with:
name: nimiq-dist
path: target/release/
- name: Run some commands
run: |
ls target/release/ -al
chmod -R +x target/release/
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
flavor: latest=true
- name: Login to image repository
if: github.ref_type == 'tag'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
with:
context: .
file: Dockerfile
push: ${{ github.ref_type == 'tag' }}
# This is required or a package with unknown architecture will be published too.
# See https://github.com/docker/build-push-action/issues/820 for further
# details.
# TODO - investigate further and see if we can find a solution where we
# don't have to set this.
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha