Skip to content

๐Ÿš€ ยป publish #3

๐Ÿš€ ยป publish

๐Ÿš€ ยป publish #3

Workflow file for this run

name: "๐Ÿš€ ยป publish"
on:
release:
types: [published]
env:
CRATE_NAME: kurv
GITHUB_TOKEN: ${{ github.token }}
RUST_BACKTRACE: 1
jobs:
build:
name: ๐Ÿ—๏ธ ยป build
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os_name: linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
bin: kurv
archive: kurv-linux-x86_64.tar.gz
- os_name: windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
bin: kurv.exe
archive: kurv-windows-x86_64.zip
steps:
- name: ๐Ÿ“ ยป checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ๐Ÿ—ƒ๏ธ ยป cache cargo
uses: Swatinem/rust-cache@v2
- name: ๐Ÿ—๏ธ ยป build kurv
uses: houseabsolute/actions-rust-cross@v0
with:
cross-version:
command: "build"
target: ${{ matrix.platform.target }}
args: "--release"
- name: ๐Ÿ“ฆ ยป archive kurv release
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
7z a ../../../${{ matrix.platform.archive }} ${{ matrix.platform.bin }}
else
tar czvf ../../../${{ matrix.platform.archive }} ${{ matrix.platform.bin }}
fi
cd -
- name: ๐Ÿ“ค ยป upload artifact
uses: actions/upload-artifact@v3
with:
name: kurv-${{ matrix.platform.os_name }}
path: "kurv-*"