Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Fei-xiangShi committed Sep 18, 2024
1 parent d280b98 commit a84e45b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Build and Release

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
Expand Down Expand Up @@ -124,19 +122,20 @@ jobs:
run: |
New-Item -Path "artifacts" -ItemType Directory -Force
New-Item -Path "artifacts/${{ matrix.target }}" -ItemType Directory -Force
Copy-Item "target/${{ matrix.target }}/release/swu_network_custom_login*" -Destination "artifacts/${{ matrix.target }}/"
if ("${{ matrix.target }}" -like "*windows*") {
Copy-Item "target/${{ matrix.target }}/release/swu_network_custom_login.exe" -Destination "artifacts/${{ matrix.target }}/"
Compress-Archive -Path "artifacts/${{ matrix.target }}/*" -DestinationPath "${{ matrix.target }}.zip"
} else {
Copy-Item "target/${{ matrix.target }}/release/swu_network_custom_login" -Destination "artifacts/${{ matrix.target }}/"
tar -czvf "${{ matrix.target }}.tar.gz" -C "artifacts/${{ matrix.target }}" .
}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}
path: ${{ matrix.target }}.tar.gz
path: |
${{ matrix.target }}.tar.gz
${{ matrix.target }}.zip
release:
needs:
Expand All @@ -153,12 +152,12 @@ jobs:
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "artifacts/**/*.tar.gz"
artifacts: "artifacts/**/*.tar.gz, artifacts/**/*.zip"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: |
# 🚀 New Release: SWU Network Custom Login Client V${{ github.ref_name }}
# 🚀 New Release: SWU Network Custom Login Client ${{ github.ref_name }}
We are excited to announce the latest release of **SWU Network Custom Login Client**, a lightweight, customizable network login client that supports a wide range of platforms and architectures. This version introduces enhanced multi-platform support, stability improvements, and bug fixes.
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@ fn get_account() -> Account {
Some(u) => u.to_string(),
None => {
error!("Invalid account line (missing username): {}", account_line);
continue; // 无效行,跳过
continue;
}
};

let password = match fields.next() {
Some(p) => p.to_string(),
None => {
error!("Invalid account line (missing password): {}", account_line);
continue; // 无效行,跳过
continue;
}
};

return Account { username, password }; // 返回有效账户
return Account { username, password };
}

error!("No valid account found in accounts.txt");
Expand Down

0 comments on commit a84e45b

Please sign in to comment.