fix typo on url #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
asset_name: kubectl-config-doctor-linux-amd64.tar.gz | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
asset_name: kubectl-config-doctor-windows-amd64.zip | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
asset_name: kubectl-config-doctor-darwin-arm64.tar.gz | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
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: | | |
cp LICENSE target/${{ matrix.target }}/release/ | |
tar -czvf ${{ matrix.asset_name }} -C target/${{ matrix.target }}/release kubectl-config-doctor LICENSE | |
- name: Create zip archive (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
cp LICENSE target/${{ matrix.target }}/release/ | |
Compress-Archive -Path target/${{ matrix.target }}/release/kubectl-config-doctor.exe, target/${{ matrix.target }}/release/LICENSE -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 }} | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Update new version in krew-index | |
uses: rajatjindal/[email protected] |