Skip to content

only one run and add cmake (for aws-lc-rs ) #13

only one run and add cmake (for aws-lc-rs )

only one run and add cmake (for aws-lc-rs ) #13

Workflow file for this run

name: Deploy
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
permissions:
contents: write
jobs:
build-and-upload:
name: Build and upload
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl
arch: amd64
family: linux
- build: windows
os: windows-latest
target: x86_64-pc-windows-msvc
arch: amd64
family: windows
- build: macos-arm64
os: macos-latest
target: aarch64-apple-darwin
arch: arm64
family: macos
- build: macos-x86_64
os: macos-latest
target: x86_64-apple-darwin
arch: amd64
family: macos
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --verbose --release --target ${{ matrix.target }}
- name: Build archive
shell: bash
run: |
# Replace with the name of your binary
binary_name="swish"
dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
mkdir "$dirname"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
cp "target/${{ matrix.target }}/release/$binary_name.exe" "swish_${{ matrix.family }}_${{ matrix.arch }}_${{ env.VERSION }}.exe"
echo "ASSET=swish_${{ matrix.family }}_${{ matrix.arch }}_${{ env.VERSION }}.exe" >> $GITHUB_ENV
else
cp "target/${{ matrix.target }}/release/$binary_name" "swish_${{ matrix.family }}_${{ matrix.arch }}_${{ env.VERSION }}"
echo "ASSET=swish_${{ matrix.family }}_${{ matrix.arch }}_${{ env.VERSION }}" >> $GITHUB_ENV
fi
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.ASSET }}