mirror of
https://github.com/winapps-org/winapps.git
synced 2026-12-01 11:55:54 -05:00
58 lines
2.1 KiB
YAML
58 lines
2.1 KiB
YAML
name: build and release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types: [ created ]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }}
|
|
runs-on: ${{ matrix.platform.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- os_name: Linux-i686-musl
|
|
os: ubuntu-20.04
|
|
target: i686-unknown-linux-musl
|
|
bin: winapps-linux-i686-musl
|
|
- os_name: Linux-i686
|
|
os: ubuntu-20.04
|
|
target: i686-unknown-linux-gnu
|
|
bin: winapps-linux-i686
|
|
- os_name: Linux-x86_64-musl
|
|
os: ubuntu-20.04
|
|
target: x84_64-unknown-linux-musl
|
|
bin: winapps-linux-amd64-musl
|
|
- os_name: Linux-x86_64
|
|
os: ubuntu-20.04
|
|
target: x86_64-unknown-linux-gnu
|
|
bin: winapps-linux-amd64
|
|
toolchain:
|
|
- nightly
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
- name: Build binary
|
|
uses: houseabsolute/actions-rust-cross@21b0f18dc621b25bfae556ff2791fca4173121e8 # v1.0.8
|
|
with:
|
|
command: "build"
|
|
target: ${{ matrix.platform.target }}
|
|
toolchain: ${{ matrix.toolchain }}
|
|
args: "--release"
|
|
strip: true
|
|
- name: Rename binary (linux and macos)
|
|
run: mv target/${{ matrix.platform.target }}/release/winapps target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}
|
|
- name: Generate SHA-256
|
|
run: shasum -a 256 target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} | cut -d ' ' -f 1 > target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}.sha256
|
|
- name: Release binary and SHA-256 checksum to GitHub
|
|
uses: softprops/action-gh-release@88b783939ccdbabad21b9a37510aed7fad5f2e60 # v3
|
|
with:
|
|
files: |
|
|
target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}
|
|
target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}.sha256
|