From 839c73706afd75880b3baca2fb289d96970daefd Mon Sep 17 00:00:00 2001 From: Mark Washeim Date: Fri, 6 Jan 2023 12:44:32 +0100 Subject: [PATCH 1/3] Create build.yaml Build file for SFOS 4.4.0.68 --- .github/workflows/build.yaml | 82 ++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..f394e95 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,82 @@ +name: Build RPMs + +on: + push: + tags: + - 'v*' + branches: + - master + pull_request: + 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/v') + 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' From 7e6874380fd9894c8e2d1257ea3fd377c893c50c Mon Sep 17 00:00:00 2001 From: Mark Washeim Date: Fri, 6 Jan 2023 14:06:45 +0100 Subject: [PATCH 2/3] Update build.yaml Switch to on release published with tags beginning with 1.1 creating binarys --- .github/workflows/build.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f394e95..616726e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,12 +1,10 @@ name: Build RPMs on: - push: + release: + types: [published] tags: - - 'v*' - branches: - - master - pull_request: + - '1.1*' branches: - master workflow_dispatch: From 3f1aaa7b963471dd2079635a0951bd02959bd2aa Mon Sep 17 00:00:00 2001 From: Mark Washeim Date: Fri, 6 Jan 2023 17:25:11 +0100 Subject: [PATCH 3/3] Update build.yaml modified conditional tag start (v->1.1) --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 616726e..55e22f4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -41,7 +41,7 @@ jobs: path: output release: name: Release - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/1.1') needs: - build runs-on: ubuntu-latest