Skip to content

Commit b14c727

Browse files
committed
feat: update ci
1 parent 3de1240 commit b14c727

File tree

7 files changed

+15
-312
lines changed

7 files changed

+15
-312
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,8 @@ jobs:
6060
name: rusty2048-cli-${{ matrix.os }}
6161
path: target/${{ matrix.target }}/release/rusty2048-cli-${{ matrix.os }}.*
6262

63-
publish-crates:
64-
needs: build
65-
runs-on: ubuntu-latest
66-
permissions:
67-
contents: read
68-
steps:
69-
- uses: actions/checkout@v4
70-
71-
- name: Install Rust
72-
uses: dtolnay/rust-toolchain@stable
73-
74-
- name: Publish to Crates.io
75-
env:
76-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
77-
run: |
78-
chmod +x scripts/ci-publish.sh
79-
./scripts/ci-publish.sh
80-
8163
release:
82-
needs: [build, publish-crates]
64+
needs: [build]
8365
runs-on: ubuntu-latest
8466
permissions:
8567
contents: write
@@ -99,14 +81,8 @@ jobs:
9981
body: |
10082
## 🎮 Rusty2048 CLI v${{ github.ref_name }}
10183
102-
### Installation Methods
103-
104-
#### Method 1: Using Cargo (Recommended)
105-
```bash
106-
cargo install rusty2048-cli
107-
```
84+
### Installation
10885
109-
#### Method 2: Download Pre-compiled Binaries
11086
Download the appropriate file for your operating system:
11187
- **Linux**: `rusty2048-cli-ubuntu-latest.tar.gz`
11288
- **macOS**: `rusty2048-cli-macos-latest.tar.gz`
@@ -125,6 +101,4 @@ jobs:
125101
- 🌍 English/Chinese support
126102
127103
### What's New
128-
- 🚀 **Automated Release**: Now automatically published to Crates.io
129-
- 📦 **Easy Installation**: Install with `cargo install rusty2048-cli`
130104
- 🔧 **Multi-platform**: Pre-compiled binaries for Linux, macOS, and Windows

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ members = [
99
resolver = "2"
1010

1111
[workspace.package]
12-
version = "0.1.0"
12+
version = "0.1.6"
1313
edition = "2021"
14-
authors = ["Your Name <your.email@example.com>"]
14+
authors = ["Kyrie Lin <a154571896@gmail.com>"]
1515
description = "A modern 2048 game implementation in Rust"
1616
license = "MIT"
1717
repository = "https://github.com/yourusername/rusty2048"

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,12 @@ rusty2048/
4646

4747
### Install CLI Version (Recommended)
4848

49-
#### Method 1: Install with Cargo (Simplest)
50-
```bash
51-
cargo install rusty2048-cli
52-
rusty2048
53-
```
54-
55-
#### Method 2: One-click Installation Script
49+
#### Method 1: One-click Installation Script
5650
```bash
5751
curl -fsSL https://raw.githubusercontent.com/honkinglin/rusty2048/main/scripts/install.sh | bash
5852
```
5953

60-
#### Method 3: Download Pre-compiled Binaries
54+
#### Method 2: Download Pre-compiled Binaries
6155
Visit [GitHub Releases](https://github.com/honkinglin/rusty2048/releases) to download binaries for your platform.
6256

6357
### Development Build

cli/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ authors.workspace = true
66
description = "Command-line interface for Rusty2048 - A modern 2048 game with AI, themes, and statistics"
77
license.workspace = true
88
repository.workspace = true
9-
keywords = ["2048", "game", "cli", "terminal", "puzzle", "ai"]
10-
categories = ["games", "command-line-utilities"]
11-
readme = "../README.md"
129

1310
[[bin]]
1411
name = "rusty2048"

scripts/ci-publish.sh

Lines changed: 0 additions & 125 deletions
This file was deleted.

scripts/install.sh

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,7 @@ detect_arch() {
4848
esac
4949
}
5050

51-
# Install using Cargo
52-
install_with_cargo() {
53-
print_status "Installing Rusty2048 CLI with Cargo..."
54-
55-
if ! command -v cargo &> /dev/null; then
56-
print_error "Cargo not installed. Please install Rust first: https://rustup.rs/"
57-
return 1
58-
fi
59-
60-
cargo install rusty2048-cli
61-
print_success "Installation complete! Use 'rusty2048' command to start the game"
62-
}
51+
6352

6453
# Download pre-compiled binary
6554
download_binary() {
@@ -147,29 +136,25 @@ main() {
147136
fi
148137

149138
echo "Choose installation method:"
150-
echo "1. Install with Cargo (Recommended)"
151-
echo "2. Download pre-compiled binary"
152-
echo "3. Use system package manager"
153-
echo "4. Exit"
139+
echo "1. Download pre-compiled binary (Recommended)"
140+
echo "2. Use system package manager"
141+
echo "3. Exit"
154142
echo ""
155143

156-
read -p "Please choose (1-4): " choice
144+
read -p "Please choose (1-3): " choice
157145

158146
case $choice in
159147
1)
160-
install_with_cargo
161-
;;
162-
2)
163148
read -p "Enter version number (leave empty for latest): " version
164149
download_binary "$version"
165150
;;
166-
3)
151+
2)
167152
if ! install_with_package_manager; then
168-
print_warning "System package manager not supported, trying Cargo installation..."
169-
install_with_cargo
153+
print_error "System package manager not supported on this platform"
154+
exit 1
170155
fi
171156
;;
172-
4)
157+
3)
173158
print_status "Exiting installation"
174159
exit 0
175160
;;

0 commit comments

Comments
 (0)