Skip to content

fix: update package version to 1.0.2 in Cargo.toml #13

fix: update package version to 1.0.2 in Cargo.toml

fix: update package version to 1.0.2 in Cargo.toml #13

Workflow file for this run

name: Publish afptool-rs
on:
push:
tags:
- '*'
jobs:
build:
name: Publish binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
# 检出代码
- name: Checkout source code
uses: actions/checkout@v3
# 设置 Rust 工具链
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
# 构建项目
- name: Build project
run: cargo build --release
# 打包二进制文件
- name: Package binary (only for release builds)
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p dist
if [ "${{ runner.os }}" = "Windows" ]; then
cp target/release/afptool-rs.exe dist/
else
cp target/release/afptool-rs dist/
fi
shell: bash
# 上传二进制文件到 Release
- uses: actions/upload-artifact@v4
with:
name: afptool-rs-${{ matrix.os }}
path: dist/*
if-no-files-found: error