Skip to content

v0.3.7

v0.3.7 #125

Workflow file for this run

on:
release:
types: [released]
name: Build
jobs:
build:
strategy:
matrix:
platform: [linux-x86_64, linux-x86_64-musl, macos-x86_64]
include:
- platform: linux-x86_64
ci_image: ubuntu-20.04
cargo_target: x86_64-unknown-linux-gnu
- platform: linux-x86_64-musl
ci_image: ubuntu-latest
cargo_target: x86_64-unknown-linux-musl
- platform: macos-x86_64
ci_image: macos-12
cargo_target: x86_64-apple-darwin
runs-on: ${{ matrix.ci_image }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust
run: |
rustup target add ${{ matrix.cargo_target }}
- name: Install protobuf
if: ${{ startsWith(matrix.ci_image, 'ubuntu') }}
run: sudo apt update && sudo apt install protobuf-compiler -y
- name: Install protobuf(macos)
if: ${{ startsWith(matrix.ci_image, 'macos') }}
run: brew install protobuf
- name: Install musl
if: ${{ endsWith(matrix.cargo_target, 'musl') }}
run: sudo apt update && sudo apt install musl-tools -y
- name: Build
run: cargo build --release --target ${{ matrix.cargo_target }}
- name: Pack
run: |
cp target/${{ matrix.cargo_target }}/release/colink-server ./
tar -zcvf colink-server-${{ matrix.platform }}.tar.gz colink-server README.md user_init_config.template.toml
- name: Upload Release Asset
uses: actions/github-script@v6
with:
script: |
const fs = require('fs').promises;
github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: ${{ github.event.release.id }},
name: 'colink-server-${{ matrix.platform }}.tar.gz',
data: await fs.readFile('colink-server-${{ matrix.platform }}.tar.gz')
});