Skip to content

优化

优化 #42

Workflow file for this run

name: Rust
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
build:
name: build on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
file: target/release/${{ github.event.repository.name }}.exe
- os: ubuntu-latest
file: target/release/${{ github.event.repository.name }}
runs-on: ${{ matrix.os }}
# outputs:
# artifact-url: ${{ steps.artifact-upload-step.outputs.artifact-url }}
steps:
- uses: actions/checkout@master
- name: Build
env:
CARGO_TERM_COLOR: always
run: cargo build --release --verbose
- name: Upload
uses: actions/upload-artifact@master
id: artifact-upload-step
with:
name: Binary-${{ matrix.os }}
path: ${{ matrix.file }}
# - name: Output artifact URL
# run: echo 'Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}'
release:
name: downloading Binary-${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
- os: ubuntu-latest
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/download-artifact@master
with:
name: Binary-${{ matrix.os }}
- name: List files
run: |
ls -lih
- name: GH Release for ${{ matrix.os }}
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
${{ github.event.repository.name }}*