Skip to content

add readme

add readme #9

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
build:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
bin_name: kubectl-config_doctor
asset_name: kubectl-config-doctor-linux-amd64.tar.gz
- os: windows-latest
target: x86_64-pc-windows-msvc
bin_name: kubectl-config_doctor.exe
asset_name: kubectl-config-doctor-windows-amd64.zip
- os: macos-latest
target: aarch64-apple-darwin
bin_name: kubectl-config_doctor
asset_name: kubectl-config-doctor-darwin-arm64.tar.gz
- os: macos-latest
target: x86_64-apple-darwin
bin_name: kubectl-config_doctor
asset_name: kubectl-config-doctor-darwin-amd64.tar.gz
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Build the project
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Create tar.gz archive (Linux/macOS)
if: runner.os != 'Windows'
run: |
tar -czvf ${{ matrix.asset_name }} -C target/${{ matrix.target }}/release ${{ matrix.bin_name }}
- name: Create zip archive (Windows)
if: runner.os == 'Windows'
run: |
Compress-Archive -Path target/${{ matrix.target }}/release/${{ matrix.bin_name }} -DestinationPath ${{ matrix.asset_name }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: ${{ matrix.asset_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}