Skip to content

Commit e8b14cc

Browse files
update: github workflow
1 parent 0ca4891 commit e8b14cc

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
14-
os: [ubuntu-latest, macos-latest, windows-latest]
14+
os: [macos-latest, windows-latest]
1515
target:
1616
- x86_64-unknown-linux-gnu
1717
- x86_64-apple-darwin
@@ -21,24 +21,23 @@ jobs:
2121
- name: Checkout repository
2222
uses: actions/checkout@v3
2323

24+
- name: Cache cargo registry
25+
uses: actions/cache@v3
26+
with:
27+
path: ~/.cargo/registry
28+
key: ${{ runner.os }}-cargo-registry
29+
restore-keys: |
30+
${{ runner.os }}-cargo-registry
31+
2432
- name: Set up Rust
2533
uses: actions-rs/toolchain@v1
2634
with:
2735
toolchain: stable
2836
target: ${{ matrix.target }}
2937
override: true
3038

31-
- name: Install cross (for Linux builds)
32-
if: matrix.os == 'ubuntu-latest'
33-
run: cargo install cross
34-
35-
- name: Build with cargo (or cross for Linux)
36-
run: |
37-
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
38-
cross build --release --target ${{ matrix.target }}
39-
else
40-
cargo build --release --target ${{ matrix.target }}
41-
fi
39+
- name: Build with cargo
40+
run: cargo build --release --target ${{ matrix.target }}
4241

4342
- name: Upload binary artifact
4443
uses: actions/upload-artifact@v3
@@ -71,21 +70,21 @@ jobs:
7170
with:
7271
upload_url: ${{ steps.create_release.outputs.upload_url }}
7372
asset_path: target/x86_64-unknown-linux-gnu/release/gcs
74-
asset_name: your-cli-linux
73+
asset_name: gcs
7574
asset_content_type: application/octet-stream
7675

7776
- name: Upload Release Asset (macOS)
7877
uses: actions/upload-release-asset@v1
7978
with:
8079
upload_url: ${{ steps.create_release.outputs.upload_url }}
8180
asset_path: target/x86_64-apple-darwin/release/gcs
82-
asset_name: your-cli-macos
81+
asset_name: gcs
8382
asset_content_type: application/octet-stream
8483

8584
- name: Upload Release Asset (Windows)
8685
uses: actions/upload-release-asset@v1
8786
with:
8887
upload_url: ${{ steps.create_release.outputs.upload_url }}
8988
asset_path: target/x86_64-pc-windows-gnu/release/gcs.exe
90-
asset_name: your-cli-windows.exe
89+
asset_name: gcs.exe
9190
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)