Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 67 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,32 @@ env:
CARGO_TERM_COLOR: always

jobs:
lint:
name: Lint and Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.88.0
override: true
components: rustfmt, clippy

- name: Check formatting
run: cargo fmt -- --check

- name: Run clippy
run: cargo clippy -- -D warnings

- name: Run tests
run: cargo test

build:
name: Build Multi-Platform
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -29,7 +53,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.88.0
override: true
target: ${{ matrix.target }}

Expand Down Expand Up @@ -57,9 +81,41 @@ jobs:
retention-days: 7
if-no-files-found: error

build-deb:
name: Build Debian Package
needs: lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.88.0
override: true

- name: Install Just
run: cargo install just

- name: Install dpkg-dev
run: sudo apt-get update && sudo apt-get install -y dpkg-dev

- name: Build .deb package
run: just build-deb

- name: Upload .deb Artifact
uses: actions/upload-artifact@v4
with:
name: tuitype-deb
path: releases/*.deb
retention-days: 7
if-no-files-found: error

publish:
name: Publish Release
needs: build
needs: [build, build-deb]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -98,11 +154,18 @@ jobs:
name: tuitype-x86_64-unknown-linux-gnu
path: artifacts/linux

- name: Download Debian Package
uses: actions/download-artifact@v4
with:
name: tuitype-deb
path: artifacts/deb

- name: Prepare Release Files
run: |
mkdir -p release
cp artifacts/windows/tuitype-x64.exe release/
cp artifacts/linux/tuitype-linux-x64 release/
cp artifacts/deb/*.deb release/
chmod +x release/tuitype-linux-x64

- name: Create Release and Upload Assets
Expand All @@ -117,4 +180,5 @@ jobs:
See the full changelog: https://github.com/${{ github.repository }}/compare/${{ env.TAG_NAME }}~1...${{ env.TAG_NAME }}
files: |
release/tuitype-x64.exe
release/tuitype-linux-x64
release/tuitype-linux-x64
release/*.deb
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/target
/debug
/test
**.vscode**
**.vscode**
/releases
/dist
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tuitype"
version = "0.1.6"
edition = "2021"
version = "0.1.7"
edition = "2024"
description = "A terminal-based typing test application similar to MonkeyType"
authors = ["RobbyV2"]
license = "MIT"
Expand Down
151 changes: 0 additions & 151 deletions build_release.sh

This file was deleted.

Loading
Loading