Skip to content

Commit

Permalink
chore: merge release-v0.3.3 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackwills committed Oct 21, 2023
2 parents 25bc651 + 09bf70a commit f24ef07
Show file tree
Hide file tree
Showing 15 changed files with 314 additions and 262 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"ms-vscode.live-server",
"mutantdino.resourcemonitor",
"rangav.vscode-thunder-client",
"redhat.vscode-yaml",
"redhat.vscode-yaml",
"rust-lang.rust-analyzer",
"serayuzgur.crates",
"tamasfe.even-better-toml",
Expand Down
19 changes: 12 additions & 7 deletions .github/release-body.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
### 2023-08-28
### 2023-10-21

### Chores
+ dependencies updated, [8ce5a1877a8c56d9bbab560c97e2596ea87cc4c0], [94a20584e6ef0701c9f36838b0dfbcd911698dbe], [29e02e0d1faae4a836c7e5cfd0d791338ff586e3], [8e4c2e686761df56920df2267b765ab1297c9972]
+ `_typos.toml` added, [84ba1020939606abf4a287cbd1de1f3a10d3f0c0]
+ docker-compose Alpine bump, [d46c425fa29f3c1d27bd57764748bae7e0b82f69]
+ dependencies updated, [e6eecbbdce9c0ccff42aa8806dddb6e3364f990c], [ec93115ece83002fa127f3358f573319e29357e1], [b36daa5aeaa354b6c4f45b7ae67ac1a6345ea1c0], [9c0de1f0feff3165d0f5b6cb5dda843c124bcfa4], [6dd953df458096aee5914411ce40e46c3f600ede]
+ Rust 1.73 linting, [21234c66c3935330ccd58543dd3a915a293ac776]

### Features
+ Custom hostname. `oxker` will use `$DOCKER_HOST` env if set, or one can use the cli argument `--host`, which takes priority over the `$DOCKER_HOST`, closes #30, [10950787649d2b66fc1e8cd8b85526df51479857]
### Docs
+ README.md updated, [3fd3915b3e929742d8007109fd4c7b4a345eb0fa]

### Refactors
+ `set_error()` takes `gui_state` and error enum, to make sure app_data & gui_state is in sync [62c78dfaa50a8d8c084f7fbf7e203b50aaa731ae]
+ `fn loading_spin` doesn't need to be async, [2e27462d1b3f0bdb27d7646511e36d0c9af07f3e]
+ LogsTZ from `&str`, [44f581f5b3652cc4e623fe145141878754dca292]
+ from string impl, [ca79893df5f05ebf445ce194d578cb8213c9755e]
+ env handling, [18c3ed43376a8b5e2d285d1b34a9f96843357d53]
+ `parse_args/mod.rs` > `parse_args.rs`, [a6ff4124319ed17d3f1c46c916418f850ef1d3b0]
+ set_info_box take `&str`, [faeaca0cd1bb243c7f4a7112b928be776b877ca1]
+ GitHub action use concurrency matrix, re-roder workflow, [85f1982f4066bfdbc764ab7b88588eded6a17f96]


see <a href='https://github.com/mrjackwills/oxker/blob/main/CHANGELOG.md'>CHANGELOG.md</a> for more details
169 changes: 100 additions & 69 deletions .github/workflows/create_release_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,69 +3,117 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

#########################
## Publish to crates.io #
#########################
#################################################
## Cross platform binary build for release page #
#################################################

- name: publish to crates.io
uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CRATES_IO_TOKEN }}
cross_platform_build:
strategy:
matrix:
platform:
- target: x86_64-unknown-linux-musl
- target: aarch64-unknown-linux-musl
- target: arm-unknown-linux-musleabihf
- target: x86_64-pc-windows-gnu
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

####################################
## Build binaries for release page #
####################################

# Install stable rust, and associated tools
- name: install rust
uses: dtolnay/rust-toolchain@stable

# Setup caching - not sure if will have any effect
- name: Rust cache
uses: swatinem/rust-cache@v2

# Install cross-rs
- name: install cross
run: cargo install cross --git https://github.com/cross-rs/cross

# Build for linux x86 musl
- name: build x86_64-unknown-linux-musl
run: cross build --target x86_64-unknown-linux-musl --release
# Compress output into tar
- name: compress aarch64 binary
run: tar -C target/x86_64-unknown-linux-musl/release -czf ./oxker_linux_x86_64.tar.gz oxker

# Build for linux aarch64, aka 64 bit pi 4
- name: build aarch64-unknown-linux-musl
run: cross build --target aarch64-unknown-linux-musl --release
# Compress output into tar
- name: compress aarch64 binary
run: tar -C target/aarch64-unknown-linux-musl/release -czf ./oxker_linux_aarch64.tar.gz oxker

# Build for linux armv6, aka 32 bit pi zero w
- name: build arm-unknown-linux-musleabihf
run: cross build --target arm-unknown-linux-musleabihf --release
# Compress output into tar
- name: compress armv6 binary
run: tar -C target/arm-unknown-linux-musleabihf/release -czf ./oxker_linux_armv6.tar.gz oxker

# Build for windows
- name: build release windows_x86_64
run: cross build --target x86_64-pc-windows-gnu --release
# Compress output into zip
- name: compress windows_x86_64 binary
run: zip -j ./oxker_windows_x86_64.zip target/x86_64-pc-windows-gnu/release/oxker.exe

#########################################
## Build images for Dockerhub & ghcr.io #
#########################################
# Set env's
- name: set names
run: |
translate_platform() { case "$1" in x86_64-unknown-linux-musl) echo "linux_x86_64.tar.gz";; aarch64-unknown-linux-musl) echo "linux_aarch64.tar.gz";; arm-unknown-linux-musleabihf) echo "linux_armv6.tar.gz";; x86_64-pc-windows-gnu) echo "windows_x86_64.zip";; *) echo "Error: Unsupported platform $1"; exit 1;; esac; }
target_platform="${{ matrix.platform.target }}"
output_name=$(translate_platform "$target_platform")
echo "TARGET_OUTPUT_NAME=${output_name}" >> $GITHUB_ENV
echo "TARGET_PLATFORM=${target_platform}" >> $GITHUB_ENV
# Build binary
- name: build
run: cross build --target "${TARGET_PLATFORM}" --release

# Compress, rename, and move
- name: compress
run: |
if [[ $TARGET_PLATFORM == *windows-gnu* ]]; then
zip -j "./oxker_${TARGET_OUTPUT_NAME}" target/${TARGET_PLATFORM}/release/oxker.exe
else
tar -C "target/${TARGET_PLATFORM}/release" -czf "./oxker_${TARGET_OUTPUT_NAME}" oxker
fi
# Upload output for release page
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: ${{ env.TARGET_PLATFORM }}
path: oxker_${{ env.TARGET_OUTPUT_NAME }}
retention-days: 1

###################
## Create release #
###################

create_release:
needs: [cross_platform_build]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup | Artifacts
uses: actions/download-artifact@v3

- name: Update Release
uses: ncipollo/[email protected]
with:
makeLatest: true
name: ${{ github.ref_name }}
tag: ${{ github.ref }}
bodyFile: ".github/release-body.md"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: |
**/oxker_*.zip
**/oxker_*.tar.gz
#########################
## Publish to crates.io #
#########################

cargo_publish:
needs: [create_release]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: publish to crates.io
uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CRATES_IO_TOKEN }}

#########################################
## Build images for Dockerhub & ghcr.io #
#########################################

image_build:
needs: [cargo_publish]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand Down Expand Up @@ -100,21 +148,4 @@ jobs:
--push \
-f containerised/Dockerfile .
###################
## Create release #
###################

- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: ${{ github.ref_name }}
body_path: ".github/release-body.md"
draft: false
files: |
oxker_linux_x86_64.tar.gz
oxker_linux_aarch64.tar.gz
oxker_linux_armv6.tar.gz
oxker_windows_x86_64.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.3.3'>v0.3.3</a>
### 2023-10-21

### Chores
+ docker-compose Alpine bump, [d46c425f](https://github.com/mrjackwills/oxker/commit/d46c425fa29f3c1d27bd57764748bae7e0b82f69)
+ dependencies updated, [e6eecbbd](https://github.com/mrjackwills/oxker/commit/e6eecbbdce9c0ccff42aa8806dddb6e3364f990c), [ec93115e](https://github.com/mrjackwills/oxker/commit/ec93115ece83002fa127f3358f573319e29357e1), [b36daa5a](https://github.com/mrjackwills/oxker/commit/b36daa5aeaa354b6c4f45b7ae67ac1a6345ea1c0), [9c0de1f0](https://github.com/mrjackwills/oxker/commit/9c0de1f0feff3165d0f5b6cb5dda843c124bcfa4), [6dd953df](https://github.com/mrjackwills/oxker/commit/6dd953df458096aee5914411ce40e46c3f600ede)
+ Rust 1.73 linting, [21234c66](https://github.com/mrjackwills/oxker/commit/21234c66c3935330ccd58543dd3a915a293ac776)

### Docs
+ README.md updated, [3fd3915b](https://github.com/mrjackwills/oxker/commit/3fd3915b3e929742d8007109fd4c7b4a345eb0fa)

### Refactors
+ LogsTZ from `&str`, [44f581f5](https://github.com/mrjackwills/oxker/commit/44f581f5b3652cc4e623fe145141878754dca292)
+ from string impl, [ca79893d](https://github.com/mrjackwills/oxker/commit/ca79893df5f05ebf445ce194d578cb8213c9755e)
+ env handling, [18c3ed43](https://github.com/mrjackwills/oxker/commit/18c3ed43376a8b5e2d285d1b34a9f96843357d53)
+ `parse_args/mod.rs` > `parse_args.rs`, [a6ff4124](https://github.com/mrjackwills/oxker/commit/a6ff4124319ed17d3f1c46c916418f850ef1d3b0)
+ set_info_box take `&str`, [faeaca0c](https://github.com/mrjackwills/oxker/commit/faeaca0cd1bb243c7f4a7112b928be776b877ca1)
+ GitHub action use concurrency matrix, re-roder workflow, [85f1982f](https://github.com/mrjackwills/oxker/commit/85f1982f4066bfdbc764ab7b88588eded6a17f96)

# <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.3.2'>v0.3.2</a>
### 2023-08-28

Expand Down
Loading

0 comments on commit f24ef07

Please sign in to comment.