Skip to content

GitHub CI build

GitHub CI build #65

Workflow file for this run

name: GitHub CI build
on:
push:
tags:
- 'v*'
env:
# For available docker images, see https://github.com/CODeRUS/docker-sailfishos-platform-sdk
OS_VERSION: 4.3.0.12
jobs:
build:
runs-on: ubuntu-latest
name: Build application
strategy:
matrix:
arch: ['i486', 'armv7hl', 'aarch64']
steps:
- uses: actions/checkout@v3
- name: Build ${{ matrix.arch }} on ${{ env.OS_VERSION }}
run: |
set -x
mkdir -p output
docker run --rm -v $PWD:/share coderus/sailfishos-platform-sdk:$OS_VERSION /bin/sh -xc '
mkdir -p build
cd build
cp -r /share/. .
mb2 -t SailfishOS-$1-$2 build -d
sudo cp -r RPMS/*.rpm /share/output/' sh_mb2 $OS_VERSION ${{ matrix.arch }}
- name: Upload RPM (${{ matrix.arch }})
uses: actions/upload-artifact@v3
with:
name: rpm-${{ matrix.arch }}
path: output
release:
name: Release
if: startsWith(github.ref, 'refs/tags/v')
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Download armv7hl
uses: actions/download-artifact@v3
with:
name: rpm-armv7hl
continue-on-error: true
- name: Download aarch64
uses: actions/download-artifact@v3
with:
name: rpm-aarch64
continue-on-error: true
- name: Download i486
uses: actions/download-artifact@v3
with:
name: rpm-i486
continue-on-error: true
- name: Extract Version Name
id: extract_name
uses: actions/github-script@v4
with:
result-encoding: string
script: |
return context.payload.ref.replace(/refs\/tags\//, '');
- name: Create a Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.extract_name.outputs.result }}
draft: false
prerelease: false
body: This release was autogenerated.
files: '*.rpm'