From 4b12b63ad941ad3cc4ab32c6791a9442d434a63b Mon Sep 17 00:00:00 2001 From: Tadej Novak Date: Thu, 15 Aug 2024 19:47:51 +0200 Subject: [PATCH] Add source tarball building action --- .github/workflows/source-tarball.yml | 103 +++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/workflows/source-tarball.yml diff --git a/.github/workflows/source-tarball.yml b/.github/workflows/source-tarball.yml new file mode 100644 index 0000000..80f4023 --- /dev/null +++ b/.github/workflows/source-tarball.yml @@ -0,0 +1,103 @@ +name: Source Tarball + +on: + workflow_dispatch: + push: + branches: + - main + tags: + - "**" + paths-ignore: + - ".gitignore" + - "README.md" + - "docs/**" + # ignore CI for other platforms + - ".github/FUNDING.yml" + - ".github/actions/**" + - ".github/workflows/Android.yml" + - ".github/workflows/iOS.yml" + - ".github/workflows/Linux.yml" + - ".github/workflows/macOS.yml" + - ".github/workflows/Windows.yml" + + pull_request: + branches: + - main + paths-ignore: + - ".gitignore" + - "README.md" + - "docs/**" + # ignore CI for other platforms + - ".github/FUNDING.yml" + - ".github/actions/**" + - ".github/workflows/Android.yml" + - ".github/workflows/iOS.yml" + - ".github/workflows/Linux.yml" + - ".github/workflows/macOS.yml" + - ".github/workflows/Windows.yml" + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + build: + name: Build Source Tarball + runs-on: ubuntu-24.04 + strategy: + matrix: + include: + - qt_series: 6 + qt_version: 6.7.2 + qt_modules: qtlocation qtpositioning + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: source + submodules: recursive + fetch-depth: 0 + + - name: Download Qt + uses: jurplel/install-qt-action@v4 + with: + aqtversion: ==3.1.* + version: ${{ matrix.qt_version }} + dir: ${{ github.workspace }} + target: desktop + modules: ${{ matrix.qt_modules }} + + - name: Build + run: | + mkdir build && cd build + cmake -S ../source -B . -DCMAKE_BUILD_TYPE=Release + cmake --build . --target package_source + + - name: Upload tarball + uses: actions/upload-artifact@v4 + with: + name: Source + path: build/maplibre-native-qt_*.tar.bz2 + + release: + name: Release + if: github.ref_type == 'tag' + runs-on: ubuntu-22.04 + needs: build + permissions: + contents: write + + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: Source + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: maplibre-native-qt_${{ github.ref_name }}_Source.tar.bz2 + allowUpdates: true + draft: true