Skip to content

v0.0.3

v0.0.3 #9

Workflow file for this run

name: "๐Ÿš€ ยป publish"
on:
release:
types: [published]
concurrency:
group: publish-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: 'bash'
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@v4
with:
name: kurv-${{ matrix.platform.os_name }}
path: ${{ matrix.platform.archive }}
publish-gh-release:
name: ๐Ÿš€ ยป publish github release
needs: build
runs-on: ubuntu-latest
steps:
- name: ๐Ÿ“ฅ ยป download artifacts
uses: actions/download-artifact@v4
with:
pattern: kurv-*
merge-multiple: true
- name: ๐Ÿ“ ยป list files
run: ls -l -a -R
- name: ๐Ÿš€ ยป upload artifacts to github release
uses: softprops/action-gh-release@v1
with:
files: |
kurv-*
publish-crates-io:
name: ๐Ÿš€ ยป publish crates.io
needs: build
runs-on: ubuntu-latest
steps:
- name: ๐Ÿ“ ยป checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ๐Ÿฆ€ ยป install rust
uses: dtolnay/rust-toolchain@stable
- name: ๐Ÿš€ ยป publish
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CRATES_TOKEN }}