53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Build and Publish
|
|
permissions:
|
|
contents: write
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
jobs:
|
|
create-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: taiki-e/create-gh-release-action@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
upload-assets:
|
|
needs: create-release
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- target: x86_64-unknown-linux-gnu
|
|
os: ubuntu-latest
|
|
- target: x86_64-pc-windows-msvc
|
|
os: windows-latest
|
|
- target: x86_64-apple-darwin
|
|
os: macos-latest
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Install deps on MacOS
|
|
if: matrix.os == 'macos-latest'
|
|
run: brew install protobuf
|
|
|
|
- name: Install deps on Windows
|
|
if: matrix.os == 'windows-latest'
|
|
run: choco install protoc
|
|
|
|
- name: Install deps on Linux
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: sudo apt-get -y install protobuf-compiler
|
|
|
|
- name: Upload
|
|
uses: taiki-e/upload-rust-binary-action@v1
|
|
with:
|
|
bin: caesar
|
|
target: ${{ matrix.target }}
|
|
build-tool: cargo
|
|
tar: unix
|
|
zip: windows
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|