harbour-Papocchio/.github/workflows/build.yml
2023-02-01 23:33:06 +01:00

62 lines
1.2 KiB
YAML

name: SailfishOS build
on:
push:
branches:
- master
- harbour
tags:
- '*'
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare
run: mkdir output
- name: Build armv7hl
id: build_armv7hl
uses: coderus/github-sfos-build@master
with:
release: 4.4.0.58
- name: Build i486
id: build_i486
uses: coderus/github-sfos-build@master
with:
release: 4.4.0.58
arch: i486
- name: Build aarch64
id: build_aarch64
uses: coderus/github-sfos-build@master
with:
release: 4.4.0.58
arch: aarch64
- name: Upload build result
uses: actions/upload-artifact@v3
with:
name: 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 }}