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