Skip to content

feat(cli): download output to dir #3

feat(cli): download output to dir

feat(cli): download output to dir #3

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: write
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
automatic_release_tag: "latest"
title: "Dev Build"
publish_crate:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
ignore-unpublished-changes: true
release_assets:
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- build: linux-x64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: "gr-linux-amd64"
- build: linux-arm64
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
artifact_name: "gr-linux-arm64"
- build: macos-x64
os: macos-latest
target: x86_64-apple-darwin
artifact_name: "gr-darwin-amd64"
- build: macos-arm64
os: macos-latest
target: aarch64-apple-darwin
artifact_name: "gr-darwin-arm64"
- build: windows-x64
os: windows-latest
target: x86_64-pc-windows-msvc
artifact_name: "gr-windows-amd64"
- build: linux-musl-x64
os: ubuntu-latest
target: x86_64-unknown-linux-musl
artifact_name: "gr-linux-musl-amd64"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Install musl-tools
run: sudo apt update && sudo apt install -y musl-tools
if: matrix.build == 'linux-musl-x64'
- name: Install gcc-aarch64-linux-gnu
run: |
sudo apt update
sudo apt install -y gcc-aarch64-linux-gnu
echo -e "[target.aarch64-unknown-linux-gnu]\nlinker = \"aarch64-linux-gnu-gcc\"" >> ~/.cargo/config.toml
if: matrix.build == 'linux-arm64'
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Upload to Release
uses: svenstaro/upload-release-action@v2
if: matrix.os != 'windows-latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/gr
asset_name: ${{ matrix.artifact_name }}
tag: latest
- name: Upload to Release (Windows)
uses: svenstaro/upload-release-action@v2
if: matrix.os == 'windows-latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/gr.exe
asset_name: ${{ matrix.artifact_name }}.exe
tag: latest