Merge branch 'master' of github.com:poetaster/harbour-tooter
This commit is contained in:
commit
95d13ab4b0
1 changed files with 80 additions and 0 deletions
80
.github/workflows/build.yaml
vendored
Normal file
80
.github/workflows/build.yaml
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
name: Build RPMs
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
tags:
|
||||
- '1.1*'
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
OS_VERSION: 4.4.0.68
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build App
|
||||
strategy:
|
||||
matrix:
|
||||
arch: ['armv7hl', 'aarch64', 'i486']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Prepare
|
||||
run: docker pull coderus/sailfishos-platform-sdk:$OS_VERSION && mkdir output
|
||||
|
||||
- name: Build ${{ matrix.arch }}
|
||||
run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$OS_VERSION /bin/bash -c "
|
||||
mkdir -p build ;
|
||||
cd build ;
|
||||
cp -r /share/* . ;
|
||||
mb2 -t SailfishOS-$OS_VERSION-${{ matrix.arch }} build ;
|
||||
sudo cp -r RPMS/*.rpm /share/output"
|
||||
|
||||
- name: Upload RPM (${{ matrix.arch }})
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: rpm-${{ matrix.arch }}
|
||||
path: output
|
||||
release:
|
||||
name: Release
|
||||
if: startsWith(github.ref, 'refs/tags/1.1')
|
||||
needs:
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download armv7hl
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: rpm-armv7hl
|
||||
continue-on-error: true
|
||||
- name: Download aarch64
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: rpm-aarch64
|
||||
continue-on-error: true
|
||||
- name: Download i486
|
||||
uses: actions/download-artifact@v2
|
||||
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'
|
Loading…
Reference in a new issue