46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
name: Package
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
runs_on:
|
|
required: true
|
|
type: string
|
|
target:
|
|
required: true
|
|
type: string
|
|
extension:
|
|
default: ""
|
|
type: string
|
|
|
|
jobs:
|
|
build:
|
|
name: Build static binaries
|
|
runs-on: ${{ inputs.runs_on }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
target: ${{ inputs.target }}
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --release --all --target ${{ inputs.target }}
|
|
|
|
- uses: papeloto/action-zip@v1
|
|
with:
|
|
files: target/${{ inputs.target }}/release/web-flash${{ inputs.extension }}
|
|
recursive: true
|
|
dest: web-flash-${{ inputs.target }}.zip
|
|
|
|
- uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
file: web-flash-${{ inputs.target }}.zip
|
|
tag: ${{ github.ref }} |