Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 87 additions & 80 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ on:
push:
branches:
- master
- release-**
- nlsfi-release
pull_request:
release:
types: ['published']
workflow_dispatch:
release:
types: ['created', 'edited']

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

jobs:
build:
runs-on: ubuntu-24.04
Expand All @@ -32,30 +29,30 @@ jobs:
qt_arch: 'android_arm64_v8a'
all_files_access: 'ON'
artifact_name: 'android-arm64'
- triplet: 'arm-neon-android'
qt_arch: 'android_armv7'
all_files_access: 'OFF'
artifact_name: 'android-arm-neon'
- triplet: 'arm-neon-android'
qt_arch: 'android_armv7'
all_files_access: 'ON'
artifact_name: 'android-arm-neon'
- triplet: 'x64-android'
qt_arch: 'android_x86_64'
all_files_access: 'OFF'
artifact_name: 'android-x64'
- triplet: 'x64-android'
qt_arch: 'android_x86_64'
all_files_access: 'ON'
artifact_name: 'android-x64'
- triplet: 'x86-android'
qt_arch: 'android_x86'
all_files_access: 'OFF'
artifact_name: 'android-x86'
- triplet: 'x86-android'
qt_arch: 'android_x86'
all_files_access: 'ON'
artifact_name: 'android-x86'
# - triplet: 'arm-neon-android'
# qt_arch: 'android_armv7'
# all_files_access: 'OFF'
# artifact_name: 'android-arm-neon'
# - triplet: 'arm-neon-android'
# qt_arch: 'android_armv7'
# all_files_access: 'ON'
# artifact_name: 'android-arm-neon'
# - triplet: 'x64-android'
# qt_arch: 'android_x86_64'
# all_files_access: 'OFF'
# artifact_name: 'android-x64'
# - triplet: 'x64-android'
# qt_arch: 'android_x86_64'
# all_files_access: 'ON'
# artifact_name: 'android-x64'
# - triplet: 'x86-android'
# qt_arch: 'android_x86'
# all_files_access: 'OFF'
# artifact_name: 'android-x86'
# - triplet: 'x86-android'
# qt_arch: 'android_x86'
# all_files_access: 'ON'
# artifact_name: 'android-x86'

steps:
- name: 🐣 Checkout
Expand Down Expand Up @@ -143,6 +140,8 @@ jobs:
- name: 🌱 Install dependencies and generate project files
env:
WORKSPACE: ${{ github.workspace }}
QFC_URL_PROD: ${{ secrets.QFC_URL_PROD }}
QFC_URL_DEV: ${{ secrets.QFC_URL_DEV }}
run: |
TRIPLET=${{ matrix.triplet }} ALL_FILES_ACCESS=${{ matrix.all_files_access }} source ./scripts/version_number.sh
TRIPLET=${{ matrix.triplet }} ALL_FILES_ACCESS=${{ matrix.all_files_access }} source ./scripts/ci/generate-version-details.sh
Expand All @@ -164,6 +163,7 @@ jobs:
-D APP_PACKAGE_NAME="${APP_PACKAGE_NAME}" \
-D APP_ICON="${APP_ICON}" \
-D APP_NAME="${APP_NAME}" \
-D QFC_URL="${QFC_URL}" \
-D NUGET_USERNAME=opengisch \
-D NUGET_TOKEN=${{ secrets.GITHUB_TOKEN }} \
-D SENTRY_DSN=${{ secrets.SENTRY_DSN }} \
Expand All @@ -185,7 +185,7 @@ jobs:

- name: 🔑 Setup signing key
env:
SIGNINGKEY: ${{ secrets.PLAYSTORE_SIGNINGKEY }}
SIGNINGKEY: ${{ secrets.APK_SIGNINGKEY }}
run: |
echo "$SIGNINGKEY" | base64 --decode > ./keystore.p12

Expand All @@ -205,13 +205,20 @@ jobs:
${{ env.CMAKE_BUILD_DIR }}/src/app/android-build/build/outputs/apk/release/android-build-release-signed.apk
${{ env.CMAKE_BUILD_DIR }}/src/app/android-build/build/outputs/apk/debug/android-build-debug.apk

- name: 🍺 Deploy
# - name: 🍺 Deploy
# run: |
# sudo apt install -y s3cmd
# # This script will rename the artifact and move it to /tmp
# NAME=${{ matrix.artifact_name }} ALL_FILES_ACCESS=${{ matrix.all_files_access }} ./scripts/ci/upload_artifacts.sh
# env:
# S3CFG: ${{ secrets.S3CMD_CFG }}

- name: mv apk files
run: |
sudo apt install -y s3cmd
# This script will rename the artifact and move it to /tmp
NAME=${{ matrix.artifact_name }} ALL_FILES_ACCESS=${{ matrix.all_files_access }} ./scripts/ci/upload_artifacts.sh
env:
S3CFG: ${{ secrets.S3CMD_CFG }}
set -e
FILENAME_APK="${CI_PACKAGE_NAME}-${CI_PACKAGE_FILE_SUFFIX}-${{ matrix.artifact_name }}.apk"
echo "📦 Renaming APK to /tmp/${FILENAME_APK}"
mv "${CMAKE_BUILD_DIR}/src/app/android-build/build/outputs/apk/release/android-build-release-signed.apk" "/tmp/${FILENAME_APK}"

- name: Upload release assets
uses: AButler/upload-release-assets@v3.0
Expand All @@ -231,49 +238,49 @@ jobs:
bundle exec fastlane run sentry_debug_files_upload path:${{ env.CMAKE_BUILD_DIR }}/src/app/android-build/build/intermediates/merged_native_libs/release


deploy_to_playstore:
name: deploy to play store
runs-on: ubuntu-22.04
needs: build
if: ${{ ( github.event_name == 'release' || ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) ) }}
steps:
- name: Checkout
uses: actions/checkout@v6
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}

- name: Vars
id: vars
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
run: |
./scripts/ci/env_gh.sh

- name: Download apks
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
run: |
wget https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-arm64.apk
wget https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-arm-neon.apk
wget https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-x64.apk
wget https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-x86.apk

- name: Upload to Google Play Store
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
run: |
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib oauth2client

if [[ -n "${{ env.CI_TAG }}" ]]
then
RELEASE_MESSAGE="Find out what's new on https://github.com/opengisch/QField/releases/tag/${{ env.CI_TAG }}"
else
RELEASE_MESSAGE="Update from commit ${GITHUB_SHA}"
fi

./scripts/basic_upload_apks_service_account.py ch.opengis.${{ env.APP_PACKAGE_NAME }} beta "${RELEASE_MESSAGE}" \
qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-arm64.apk \
qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-arm-neon.apk \
qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-x64.apk \
qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-x86.apk
env:
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
# deploy_to_playstore:
# name: deploy to play store
# runs-on: ubuntu-22.04
# needs: build
# if: ${{ ( github.event_name == 'release' || ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) ) }}
# steps:
# - name: Checkout
# uses: actions/checkout@v6
# if: ${{ env.SENTRY_AUTH_TOKEN != '' }}

# - name: Vars
# id: vars
# if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
# run: |
# ./scripts/ci/env_gh.sh

# - name: Download apks
# if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
# run: |
# wget https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-arm64.apk
# wget https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-arm-neon.apk
# wget https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-x64.apk
# wget https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-x86.apk

# - name: Upload to Google Play Store
# if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
# run: |
# pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib oauth2client

# if [[ -n "${{ env.CI_TAG }}" ]]
# then
# RELEASE_MESSAGE="Find out what's new on https://github.com/opengisch/QField/releases/tag/${{ env.CI_TAG }}"
# else
# RELEASE_MESSAGE="Update from commit ${GITHUB_SHA}"
# fi

# ./scripts/basic_upload_apks_service_account.py ch.opengis.${{ env.APP_PACKAGE_NAME }} beta "${RELEASE_MESSAGE}" \
# qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-arm64.apk \
# qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-arm-neon.apk \
# qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-x64.apk \
# qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-android-x86.apk
# env:
# GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}


comment_pr:
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
---
name: 🍏 iOS

on:
push:
branches:
- master
- release-**
pull_request:
release:
types: ['published']
on: []

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
push:
branches:
- master
- release-**
- nlsfi-release
pull_request:
workflow_dispatch:
release:
types: ['published']
types: ['created', 'edited']

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -186,14 +187,14 @@ jobs:
asset_name: ${{ env.ARTIFACT_NAME }}
overwrite: true

- name: 📮 Upload debug symbols
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && env.ARTIFACT_NAME != null
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG_SLUG: opengisch
SENTRY_PROJECT_SLUG: qfield
run: |
bundle exec fastlane run sentry_debug_files_upload path:build
# - name: 📮 Upload debug symbols
# if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && env.ARTIFACT_NAME != null
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG_SLUG: opengisch
# SENTRY_PROJECT_SLUG: qfield
# run: |
# bundle exec fastlane run sentry_debug_files_upload path:build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
---
name: 🍎 MacOS
on:
push:
branches:
- master
- release-**
pull_request:
release:
types: ['published']
on: []

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
53 changes: 27 additions & 26 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- release-**
pull_request:
release:
types: ['published']
types: ['created', 'edited']
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -146,21 +146,21 @@ jobs:
${{ env.CMAKE_BUILD_DIR }}/_CPack_Packages/**/*.log
${{ env.CMAKE_BUILD_DIR }}/CMakeCache.txt

- name: 🎭 Sign
if: ( github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') ) || github.event_name == 'workflow_dispatch' && env.ARTIFACT_NAME != null
uses: azure/trusted-signing-action@v0.5.11
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: https://weu.codesigning.azure.net/
code-signing-account-name: OPENGISch
certificate-profile-name: OPENGISch
files-folder: ${{ env.CMAKE_BUILD_DIR }}
files-folder-filter: exe,msi
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
# - name: 🎭 Sign
# if: ( github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') ) || github.event_name == 'workflow_dispatch' && env.ARTIFACT_NAME != null
# uses: azure/trusted-signing-action@v0.5.11
# with:
# azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
# azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
# azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
# endpoint: https://weu.codesigning.azure.net/
# code-signing-account-name: OPENGISch
# certificate-profile-name: OPENGISch
# files-folder: ${{ env.CMAKE_BUILD_DIR }}
# files-folder-filter: exe,msi
# file-digest: SHA256
# timestamp-rfc3161: http://timestamp.acs.microsoft.com
# timestamp-digest: SHA256

- name: 📦 Upload package
if: ${{ env.ARTIFACT_NAME != null }}
Expand Down Expand Up @@ -191,15 +191,15 @@ jobs:
ruby-version: '3.4' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: 🍺 Upload to S3
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')
env:
S3_BUCKET: qfieldapks
S3_REGION: ch-dk-2
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY}}
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY}}
run: |
bundle exec fastlane windows upload_s3 exe:${{ env.ARTIFACT_PATHNAME }}
# - name: 🍺 Upload to S3
# if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')
# env:
# S3_BUCKET: qfieldapks
# S3_REGION: ch-dk-2
# S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY}}
# S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY}}
# run: |
# bundle exec fastlane windows upload_s3 exe:${{ env.ARTIFACT_PATHNAME }}

- name: 📮 Upload debug symbols
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
Expand All @@ -213,7 +213,8 @@ jobs:
name: deploy (ms store)
runs-on: windows-2022

if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')
if: false
# if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')

needs: build

Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ set(APK_VERSION_CODE "1" CACHE STRING "Apk Version Code (Example: 1)")
set(APP_VERSION "0" CACHE STRING "Application Version (Example: v1.0.0)")
set(APP_VERSION_STR "local - dev" CACHE STRING "Application Version Name (Example: 1.0.0 - Homerun)")
set(APP_PACKAGE_NAME "qfield" CACHE STRING "Package name suffix. E.g. qfield --> ch.opengis.qfield")
set(QFC_URL "https://app.qfield.cloud" CACHE STRING "Default QfieldCloud url")

string(REGEX REPLACE "v" "" CLEAN_APP_VERSION "${APP_VERSION}")

Expand Down
Loading
Loading