更改自动构建
This commit is contained in:
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@ -3,6 +3,8 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
workflow_dispatch: {}
|
||||
jobs:
|
||||
build:
|
||||
@ -23,7 +25,7 @@ jobs:
|
||||
target: x86_64-apple-darwin
|
||||
archive-name: ncmmiao-macos.tar.gz
|
||||
- build: windows
|
||||
os: windows-2019
|
||||
os: windows-latest
|
||||
rust: stable-x86_64-msvc
|
||||
target: x86_64-pc-windows-msvc
|
||||
archive-name: ncmmiao-windows.7z
|
||||
@ -31,7 +33,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
@ -39,6 +41,7 @@ jobs:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
profile: minimal
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Build binary
|
||||
@ -66,8 +69,9 @@ jobs:
|
||||
# tar -czf "${{ matrix.archive-name }}" LICENSE README.md ncmmiao
|
||||
tar -czf "${{ matrix.archive-name }}" README.md ncmmiao
|
||||
fi
|
||||
- name: Upload archive
|
||||
uses: actions/upload-artifact@v1
|
||||
- name: Release archive
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
name: ${{ matrix.archive-name }}
|
||||
path: archive/${{ matrix.archive-name }}
|
||||
# name: ${{ matrix.archive-name }}
|
||||
files: archive/${{ matrix.archive-name }}
|
||||
|
||||
Reference in New Issue
Block a user