Skip to content

Commit

Permalink
adding separate deploy stage
Browse files Browse the repository at this point in the history
  • Loading branch information
arnk-basyskom committed Jan 24, 2024
1 parent aa62e5d commit d0d3bed
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 12 deletions.
62 changes: 51 additions & 11 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: Android
on:
workflow_call:
workflow_dispatch:
push:

jobs:
build:
runs-on: ubuntu-latest
runs-on: thuban
container:
image: stateoftheartio/qt6:6.6-android-aqt
options: --user root
Expand All @@ -14,8 +15,8 @@ jobs:
QTOPCUA_BUILD_ARGS: "-DFEATURE_open62541_security:BOOL=ON -DFEATURE_gds:BOOL=ON -DCMAKE_BUILD_TYPE=Release"
QT_PATH: "/opt/Qt/6.6.1"
SSL_PATH: "dependencies/android_openssl/ssl_3"
ANDROID_VERSION_CODE: "3"
ANDROID_VERSION_NAME: "1.0.0"
ANDROID_VERSION_CODE: ${{github.run_number}}
ANDROID_VERSION_NAME: ${{github.ref}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -103,14 +104,53 @@ jobs:
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "33.0.0"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: Signed app bundle
name: android-apk
path: ${{steps.sign_apk.outputs.signedReleaseFile}}
- uses: r0adkll/upload-google-play@v1
- uses: actions/upload-artifact@v3
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
releaseFiles: ${{steps.sign_aab.outputs.signedReleaseFile}}
packageName: com.basyskom.opcua.app
track: internal
status: draft
name: android-abb
path: ${{steps.sign_aab.outputs.signedReleaseFile}}

deploy:
needs: build
if: github.ref == 'refs/heads/prepare-for-github-ci'
runs-on: thuban
steps:
- uses: actions/download-artifact@v3
- name: Rename APK
run: mv ./android-apk/android-build-release-unsigned-signed.apk ./android-apk/opc-ua-browser_${{ env.ANDROID_VERSION_NAME }}_${{ env.ANDROID_VERSION_CODE }}.apk
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
New Release ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./android-apk/opc-ua-browser_${{ env.ANDROID_VERSION_NAME }}_${{ env.ANDROID_VERSION_CODE }}.apk
asset_name: opc-ua-browser_${{ env.ANDROID_VERSION_NAME }}_${{ env.ANDROID_VERSION_CODE }}.apk
asset_content_type: application/zip
#- uses: r0adkll/upload-google-play@v1
# with:
# serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
# releaseFiles: "${{steps.sign_aab.outputs.signedReleaseFile}}"
# packageName: com.basyskom.opcua.app
# track: internal
# status: draft


# ./android-abb/android-build-release.aab
# ./android-apk/android-build-release-unsigned-signed.apk
4 changes: 3 additions & 1 deletion .github/workflows/qmllint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ jobs:
with:
fetch-depth: 1
- name: Validate QML
uses: liri-infra/qmllint-action@master
uses: liri-infra/qmllint-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d0d3bed

Please sign in to comment.