mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-06 23:27:19 +02:00
feat: basic ci
This commit is contained in:
parent
488f152d14
commit
16e4ae6332
48
.github/workflows/build.yml
vendored
Normal file
48
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
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-aarch64
|
||||||
|
os: ubuntu-20.04
|
||||||
|
target: aarch64-unknown-linux-musl
|
||||||
|
bin: winapps-linux-arm64
|
||||||
|
- os_name: Linux-x86_64
|
||||||
|
os: ubuntu-20.04
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
bin: winapps-linux-amd64
|
||||||
|
toolchain:
|
||||||
|
- stable
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build binary
|
||||||
|
uses: houseabsolute/actions-rust-cross@v0
|
||||||
|
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@v1
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}
|
||||||
|
target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}.sha256
|
Loading…
x
Reference in New Issue
Block a user