Skip to content

0.14.0

0.14.0 #9

Workflow file for this run

name: Release Pipeline
on:
release:
types: [published]
jobs:
run_build:
name: Build for ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
file-suffix: ""
- target: x86_64-apple-darwin
os: macos-latest
file-suffix: ""
- target: aarch64-apple-darwin
os: macos-latest
file-suffix: ""
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: ${{ matrix.target }}
override: true
- if: runner.os == 'Linux'
run: sudo apt update && sudo apt install -y libvncserver-dev
- if: runner.os == 'macOS'
run: brew install libvncserver
- name: Build binary
# We don't want to e.g. set "-C target-cpu=native", so that the binary should run everywhere
run: RUSTFLAGS='' cargo build --release --target=${{ matrix.target }} --no-default-features
- name: Rename binary file
run: mv target/${{ matrix.target }}/release/breakwater${{ matrix.file-suffix }} breakwater-${{ matrix.target }}${{ matrix.file-suffix }}
- name: Upload Release binaries
uses: softprops/action-gh-release@v1
with:
files: breakwater-${{ matrix.target }}${{ matrix.file-suffix }}
push_docker_image:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: sbernauer/breakwater
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}