5 Commits
dev ... master

Author SHA1 Message Date
Arkaprabha Chakraborty
a0a7f051c5 chore: update README.md 2025-02-19 22:21:24 +05:30
Arkaprabha Chakraborty
7a734ac2f4 refactor: rename preview.png to cover.png 2024-12-01 00:09:08 +05:30
Arkaprabha Chakraborty
f2a57b1078 fix: delete blob/rustcm-cli.png 2024-12-01 00:08:50 +05:30
Arkaprabha Chakraborty
1d6ab1291d chore: update binaries to not have redundant version number 2024-10-05 16:33:01 +05:30
Arkaprabha Chakraborty
bfbd9d6b1f Add workflow to test, build and release 2024-09-27 16:46:21 +05:30
4 changed files with 75 additions and 1 deletions

74
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,74 @@
name: Rust CI/CD
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
release:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Windows GNU toolchain
run: |
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64-x86-64
- name: Get version
id: get_version
run: echo "VERSION=$(grep '^version =' Cargo.toml | cut -d '"' -f2)" >> $GITHUB_OUTPUT
- name: Build Release for Linux
run: cargo build --release --target x86_64-unknown-linux-gnu
- name: Build Release for Windows
run: |
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
- name: Verify binaries and create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
linux_binary="./target/x86_64-unknown-linux-gnu/release/rustcm-cli"
windows_binary="./target/x86_64-pc-windows-gnu/release/rustcm-cli.exe"
if [ ! -f "$linux_binary" ]; then
echo "Error: Linux binary not found at $linux_binary"
exit 1
fi
if [ ! -f "$windows_binary" ]; then
echo "Error: Windows binary not found at $windows_binary"
exit 1
fi
version="${{ steps.get_version.outputs.VERSION }}"
tag_name="v$version"
release_name="Release v$version"
gh release create "$tag_name" \
--title "$release_name" \
--notes "Automated release for version $version" \
--prerelease \
"$linux_binary#rustcm-cli-linux-x86_64" \
"$windows_binary#rustcm-cli-windows-x86_64.exe"

View File

@@ -1,4 +1,4 @@
![rustcm-cli.png](blob/rustcm-cli.png)
![cover.png](blob/cover.png)
# Rust Simple Text Cipher Machine / ru·s·t·c·m /

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB