mirror of
https://github.com/estkme-group/lpac
synced 2024-08-18 15:50:42 +02:00
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
tags: [v*]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build for ${{ matrix.build.name }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
build:
|
|
- {variant: make, name: Linux, artifact: linux-x64}
|
|
- {variant: debian, name: Debian, artifact: debian-x64}
|
|
- {variant: mingw, name: Windows with MinGW, artifact: windows-x64}
|
|
- {variant: woa-mingw, name: Windows on ARM with MinGW, artifact: windows-arm64}
|
|
include:
|
|
- os: macos-latest
|
|
build: {variant: make, name: macOS, artifact: macos-universal}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Setup Toolchain
|
|
run: ./scripts/setup-debian.sh
|
|
if: runner.os == 'Linux'
|
|
- name: Build for ${{ matrix.build.name }}
|
|
run: ./scripts/build-ci.sh ${{ matrix.build.variant }}
|
|
- name: Upload ${{ matrix.build.name }} to Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.build.artifact }}
|
|
path: ${{ github.workspace }}/action/lpac*.*
|
|
release:
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
needs: build
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download Artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
merge-multiple: true
|
|
pattern: '*'
|
|
- name: Run SHA1SUM
|
|
id: checksum
|
|
run: |
|
|
echo 'sha1sum<<EOF' >> $GITHUB_OUTPUT
|
|
sha1sum * >> $GITHUB_OUTPUT
|
|
echo 'EOF' >> $GITHUB_OUTPUT
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
body: |
|
|
```plain
|
|
${{ steps.checksum.outputs.sha1sum }}
|
|
```
|
|
append_body: true
|
|
files: '*'
|