-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e1d453d
Showing
12 changed files
with
2,213 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
authors: | ||
- octocat | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- Semver-Major | ||
- breaking-change | ||
- title: Exciting New Features 🎉 | ||
labels: | ||
- Semver-Minor | ||
- enhancement | ||
- title: Other Changes | ||
labels: | ||
- "*" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Main | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
checks: | ||
name: Checks | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install Rust Toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
components: rustfmt | ||
targets: x86_64-unknown-linux-gnu | ||
|
||
- name: Sources Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check Formatting | ||
run: cargo fmt --all --check | ||
|
||
- name: Cargo Check | ||
run: cargo check | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- build: linux-gnu | ||
target: x86_64-unknown-linux-gnu | ||
- build: linux-musl | ||
target: x86_64-unknown-linux-musl | ||
|
||
steps: | ||
- name: Ubuntu Setup | ||
if: matrix.build == 'linux-musl' | ||
run: | | ||
sudo apt update | ||
sudo apt install -y --no-install-recommends musl-tools | ||
- name: Install Rust Toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
targets: ${{ matrix.target }} | ||
|
||
- name: Sources Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build | ||
run: cargo build --target ${{ matrix.target }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
|
||
env: | ||
bin_name: kubectl-copi | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- build: linux-gnu | ||
target: x86_64-unknown-linux-gnu | ||
- build: linux-musl | ||
target: x86_64-unknown-linux-musl | ||
|
||
steps: | ||
- name: Ubuntu Setup | ||
if: matrix.build == 'linux-musl' | ||
run: | | ||
sudo apt update | ||
sudo apt install -y --no-install-recommends musl-tools | ||
- name: Install Rust Toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
targets: ${{ matrix.target }} | ||
|
||
- name: Sources Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set Version in Cargo.toml | ||
run: | | ||
sed -i 's/version = "0.1.0" ###/version = "${{ github.ref_name }}"/g' Cargo.toml | ||
- name: Build Release | ||
run: cargo build --release --target ${{ matrix.target }} | ||
|
||
- name: Set "archive" Env Variable | ||
run: echo "archive=$(echo ${{ env.bin_name }}_${{ github.ref_name }}_${{ matrix.target }}.tar.gz)" >> "$GITHUB_ENV" | ||
|
||
- name: Create Archive and SHASUM | ||
run: | | ||
mv ./target/${{ matrix.target }}/release/${{ env.bin_name }} . | ||
tar -czf ./${{ env.archive }} ${{ env.bin_name }} LICENSE | ||
sha256sum ${{ env.archive }} > ${{ env.archive }}.sha256 | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.archive }} | ||
path: ./${{ env.archive }}* | ||
|
||
release: | ||
name: Release | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
|
||
- name: Tree | ||
run: tree | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
generate_release_notes: true | ||
files: '**/kubectl-rsh_*.tar.gz*' | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
Oops, something went wrong.