2023-02-25 12:26:12 +00:00
|
|
|
name: Github CI build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2023-02-25 12:32:04 +00:00
|
|
|
- develop
|
2023-02-25 12:26:12 +00:00
|
|
|
- master
|
|
|
|
env:
|
|
|
|
RELEASE: 4.4.0.68
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-02-25 12:47:35 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-02-25 12:26:12 +00:00
|
|
|
|
|
|
|
- name: Prepare
|
|
|
|
run: mkdir output
|
|
|
|
|
|
|
|
- name: Build armv7hl
|
|
|
|
id: build_armv7hl
|
|
|
|
uses: coderus/github-sfos-build@master
|
|
|
|
with:
|
|
|
|
release: ${{ env.RELEASE }}
|
|
|
|
arch: armv7hl
|
|
|
|
|
|
|
|
- name: Build aarch64
|
|
|
|
id: build_aarch64
|
|
|
|
uses: coderus/github-sfos-build@master
|
|
|
|
with:
|
|
|
|
release: ${{ env.RELEASE }}
|
|
|
|
arch: aarch64
|
|
|
|
|
|
|
|
- name: Build i486
|
|
|
|
id: build_i486
|
|
|
|
uses: coderus/github-sfos-build@master
|
|
|
|
with:
|
|
|
|
release: ${{ env.RELEASE }}
|
|
|
|
arch: i486
|
|
|
|
|
|
|
|
- name: Upload build result
|
2023-02-25 12:47:35 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-02-25 12:26:12 +00:00
|
|
|
with:
|
|
|
|
name: output-rpms
|
|
|
|
path: RPMS
|
|
|
|
|
|
|
|
- name: Create release
|
|
|
|
if: contains(github.ref, 'release')
|
|
|
|
run: |
|
|
|
|
set -x
|
|
|
|
assets=()
|
|
|
|
for asset in RPMS/*.rpm; do
|
|
|
|
assets+=("-a" "$asset")
|
|
|
|
done
|
|
|
|
tag_name="${GITHUB_REF##*/}"
|
|
|
|
hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|