add github workflow to build for sailfishos #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build all arch for sailfish | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build App | |
strategy: | |
matrix: | |
arch: ['armv7hl', 'aarch64', 'i486'] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Prepare | |
run: mkdir output | |
- name: Build (${{ matrix.arch }}) | |
uses: coderus/github-sfos-build@master | |
with: | |
arch: ${{ matrix.arch }} | |
release: 4.5.0.16 | |
- name: Upload RPM (${{ matrix.arch }}) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpm-${{ matrix.arch }} | |
path: RPMS | |
- name: Create release | |
if: contains(github.ref, 'v') | |
run: | | |
set -x | |
assets=() | |
for asset in RPMS/*.rpm; do | |
assets+=("-a" "$asset") | |
done | |
tag_name="${GITHUB_REF##*/}" | |
gh release create "$tag_name" "${assets[@]}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |