Skip to content

Commit

Permalink
Release v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-delfino1995 committed Jul 2, 2022
1 parent 280b739 commit be18a92
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 66 deletions.
150 changes: 92 additions & 58 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,78 @@ jobs:
command: test
args: --all

github-release:
release:
needs: [test]
runs-on: ubuntu-latest
timeout-minutes: 5
env:
RUST: stable
TARGET: x86_64-unknown-linux-musl
BIN: kct
NAME: kct-linux-amd64
strategy:
matrix:
target:
- aarch64-apple-darwin
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl

- i686-pc-windows-msvc
- i686-unknown-linux-gnu
- i686-unknown-linux-musl

- x86_64-apple-darwin
- x86_64-pc-windows-msvc
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
include:
- target: aarch64-apple-darwin
os: macOS-latest
bin: kct
name: kct-darwin-aarch64
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
bin: kct
name: kct-linux-gnu-aarch64
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
bin: kct
name: kct-linux-musl-aarch64

- target: i686-pc-windows-msvc
os: windows-latest
bin: kct.exe
name: kct-windows-msvc-i686.exe
- target: i686-unknown-linux-gnu
os: ubuntu-latest
bin: kct
name: kct-linux-gnu-i686
- target: i686-unknown-linux-musl
os: ubuntu-latest
bin: kct
name: kct-linux-musl-i686

- target: x86_64-apple-darwin
os: macOS-latest
bin: kct
name: kct-darwin-amd64
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
bin: kct
name: kct-linux-gnu-amd64
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
bin: kct
name: kct-linux-musl-amd64
- target: x86_64-pc-windows-msvc
os: windows-latest
bin: kct.exe
name: kct-windows-msvc-amd64.exe
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST }}
toolchain: stable
override: true
target: ${{ env.TARGET }}
target: ${{ matrix.target }}

- name: Cache cargo dependencies
uses: actions/cache@v2
Expand All @@ -85,23 +138,45 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Linux x86 cross compiler
if: ${{ startsWith(matrix.target, 'i686-unknown-linux-') }}
run: sudo apt install gcc-multilib

- name: ARM cross compiler
if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
uses: actions-rs/cargo@v1
with:
command: install
args: cross

- name: ARM gcc
if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
run: sudo apt install gcc-aarch64-linux-gnu

- name: Musl gcc
if: ${{ endsWith(matrix.target, '-musl') }}
run: sudo apt install musl musl-tools

- name: Run cross build
if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
shell: bash
run: cross build --bin=kct --release --target ${{ matrix.target }}

- name: Run build
if: ${{ !startsWith(matrix.target, 'aarch64-unknown-linux-') }}
uses: actions-rs/cargo@v1
with:
command: build
args: --bin=kct --release --target ${{ env.TARGET }}
args: --bin=kct --release --target ${{ matrix.target }}

- name: Create packages
shell: bash
run: |
strip target/${{ env.TARGET }}/release/${{ env.BIN }}
cd target/${{ env.TARGET }}/release
cp ${{ env.BIN }} ../../../${{ env.NAME }}
cd -
cd target/${{ matrix.target }}/release
cp ${{ matrix.bin }} ../../../${{ matrix.name }}
- name: Generate SHA-256
run: shasum -a 256 ${{ env.NAME }} > ${{ env.NAME }}.sha256
run: shasum -a 256 ${{ matrix.name }} > ${{ matrix.name }}.sha256

- name: Publish
uses: softprops/action-gh-release@v1
Expand All @@ -110,44 +185,3 @@ jobs:
files: "kct*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cargo-release:
needs: [test]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Cache cargo dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install cargo release
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-release

- name: Run cargo login
uses: actions-rs/cargo@v1
with:
command: login
args: ${{ secrets.CARGO_TOKEN }}

- name: Publish crates
uses: actions-rs/cargo@v1
with:
command: release
args: --no-dev-version --skip-push --skip-tag --no-confirm
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.5.0] - 2022-07-01

### Added

Expand All @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- stop compiling archived packages due to lack of dependencies
- stop compiling archived packages due to lack of dependencies management
- `_` global removed in favor of `kct.io` lib

## [0.4.0] - 2021-12-14
Expand Down Expand Up @@ -92,7 +92,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- package description from `kcp.json`
- "extensibility" guarantees by forbidding non object paths to K8s objects

[Unreleased]: https://github.com/bruno-delfino1995/kct/compare/v0.4.0...HEAD
[0.5.0]: https://github.com/bruno-delfino1995/kct/compare/v0.5.0...v0.4.0
[0.4.0]: https://github.com/bruno-delfino1995/kct/compare/v0.4.0...v0.3.1
[0.3.1]: https://github.com/bruno-delfino1995/kct/compare/v0.3.1...v0.2.0
[0.2.0]: https://github.com/bruno-delfino1995/kct/compare/v0.2.0...v0.1.0
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ members = [
"crates/kct_kube",
"crates/kct_package"
]

[profile.release]
strip = "debuginfo"
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,23 @@ KCT is a tool for taming the Kubernetes configuration beast by using Jsonnet whi

## Installation

There are three ways you can install our tool:
### Releases

- By adding a binary releases from the [Releases Page](https://github.com/bruno-delfino1995/kct/releases) to your `$PATH`
- By installing the binary at [crates.io](https://crates.io/crates/kct) with `cargo install kct`
- Through your prefered package manager for your distro:
- Arch user with `yay -S kct`
We build binaries for most platforms, you can take a look at our [Releases Page](https://github.com/bruno-delfino1995/kct/releases). From there, grab which binary matches your platform and add it to your `$PATH`

### Build from sources

Our minimum supported rust version (MSRV) is the latest stable, and it'll probably stay that way until we think about external extensions. To build it from source, you just need to run:

``` sh
cargo build --bin=kct --release
```

And if you have the cargo bin folder on your path, you can install it directly with:

``` sh
cargo install --path=bin
```

## Documentation

Expand Down

0 comments on commit be18a92

Please sign in to comment.