Skip to content

Commit

Permalink
docs: add all docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
auula committed Jul 3, 2024
1 parent a05e784 commit f7bc311
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ jobs:
matrix:
os: [macos-latest, windows-latest]
arch: [x86_64, arm64]
rust-target:
macos-latest:
- x86_64-apple-darwin
- aarch64-apple-darwin
windows-latest:
- x86_64-pc-windows-msvc
- aarch64-pc-windows-msvc
include:
- os: macos-latest
rust-target: x86_64-apple-darwin
- os: macos-latest
rust-target: aarch64-apple-darwin
- os: windows-latest
rust-target: x86_64-pc-windows-msvc
- os: windows-latest
rust-target: aarch64-pc-windows-msvc

steps:
- name: Checkout code
Expand Down Expand Up @@ -57,23 +59,24 @@ jobs:

- name: Package and Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: v1.0.0 # 替换为你的发布标签
run: |
# 创建发布目录
mkdir -p release

# 打包构建文件
cp -r target/${{ matrix.rust-target }}/debug your_executable release/
cp -r target/${{ matrix.rust-target }}/debug/your_executable release/
# 如果是 release 版本,替换 debug 为 release

# 打包文件夹成 zip
zip -r release.zip release
zip -r release-${{ matrix.os }}-${{ matrix.arch }}.zip release

# 创建 GitHub Release
gh release create $RELEASE_TAG release.zip -t "Release $RELEASE_TAG"
gh release create $RELEASE_TAG release-${{ matrix.os }}-${{ matrix.arch }}.zip -t "Release $RELEASE_TAG"

# 清理临时文件
rm -rf release release.zip
rm -rf release release-${{ matrix.os }}-${{ matrix.arch }}.zip

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
Expand Down

0 comments on commit f7bc311

Please sign in to comment.