diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ddaa383 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,67 @@ +name: Github CI build + +on: + push: + tags: + - '*' + pull_request: + branches: + - master + - patchmanager3 + +env: + RELEASE: 4.3.0.12 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Prepare + run: mkdir output + + - name: Build armv7hl + run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c " + mkdir -p build ; + cd build ; + cp -r /share/* . ; + mb2 -t SailfishOS-$RELEASE-armv7hl build --enable-debug ; + sudo cp -r RPMS/*.rpm /share/output" + + - name: Build aarch64 + run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c " + mkdir -p build ; + cd build ; + cp -r /share/* . ; + mb2 -t SailfishOS-$RELEASE-aarch64 build --enable-debug ; + sudo cp -r RPMS/*.rpm /share/output" + + - name: Build i486 + run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c " + mkdir -p build ; + cd build ; + cp -r /share/* . ; + mb2 -t SailfishOS-$RELEASE-i486 build --enable-debug ; + sudo cp -r RPMS/*.rpm /share/output" + + - name: Upload build result + uses: actions/upload-artifact@v2 + with: + name: output-rpms + path: output + + - name: Create release + if: contains(github.ref, 'release') + run: | + set -x + assets=() + for asset in output/*.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 }} + diff --git a/.gitignore b/.gitignore index 7fa5147..3bb4cb9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ harbour-sailslack.pro.user .qmake.conf +build/