Compare commits

..

No commits in common. "f05be2ff39ebcee8f2258aba65ffaea0763b62bc" and "14ba91edba5f9581dcc3d38002b9ba0c3f51bef3" have entirely different histories.

3 changed files with 64 additions and 48 deletions

37
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,37 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build release
run-name: Build v${{ inputs.version }}
on:
workflow_call:
inputs:
version:
description: "Version"
required: true
type: string
binary-type:
description: "Binary type"
type: string
required: true
jobs:
build-android:
uses: ./.github/workflows/build_apk.yml
if: ${{ inputs.binary-type != 'ipa' }}
with:
binary-type: ${{ inputs.binary-type }}
flavor: prod
stage-backend: false
version: ${{ inputs.version }}
build-ios:
uses: ./.github/workflows/build_ipa.yml
if: ${{ inputs.binary-type == 'ipa' }}
with:
stage-backend: false
version: ${{ inputs.version }}

View file

@ -98,8 +98,8 @@ jobs:
- name: Restore Android keystore .jsk and .properties files
run: |
bash .github/scripts/restore_from_base64.sh "${{ secrets.KEYSTORE_PROPERTIES }}" "android/key.properties"
bash .github/scripts/restore_from_base64.sh "${{ secrets.KEYSTORE }}" "android/app/keystore.jks"
bash .github/scripts/restore_from_base64.sh "${{ secrets.KEYSTORE_PROPERTIES }}" "$RUNNER_TEMP/android/app/key.properties"
bash .github/scripts/restore_from_base64.sh "${{ secrets.KEYSTORE }}" "$RUNNER_TEMP/android/keystore.jks"
- name: Restore google-services.json
run: bash .github/scripts/restore_from_base64.sh "${{ secrets.GOOGLE_SERVICES_JSON_ANDROID }}" "android/app/google-services.json"

View file

@ -22,48 +22,30 @@ on:
description: "Release notes"
required: true
type: string
run-integration-tests:
description: "Run integration tests"
required: true
type: boolean
default: true
jobs:
run-integration-tests:
name: Run integration tests
if: ${{ inputs.run-integration-tests }}
if: false
uses: ./.github/workflows/run_integration_tests.yml
secrets: inherit
build-android:
name: Build Android (.${{ matrix.binary-type }})
needs: [run-integration-tests]
if: always() && (needs.run-integration-tests.result == 'success' || needs.run-integration-tests.result == 'skipped')
build:
name: Build ${{ matrix.binary-type != 'ipa' && 'Android' || 'iOS' }} (.${{ matrix.binary-type }})
#needs: [run-integration-tests]
strategy:
matrix:
binary-type: [apk, appbundle]
uses: ./.github/workflows/build_apk.yml
secrets: inherit
binary-type: [apk, appbundle, ipa]
uses: ./.github/workflows/build.yml
with:
binary-type: ${{ matrix.binary-type }}
flavor: prod
stage-backend: false
version: ${{ inputs.version }}
build-ios:
name: Build iOS (.ipa)
needs: [run-integration-tests]
if: always() && (needs.run-integration-tests.result == 'success' || needs.run-integration-tests.result == 'skipped')
uses: ./.github/workflows/build_ipa.yml
secrets: inherit
with:
stage-backend: false
version: ${{ inputs.version }}
generate-release-notes:
name: Generate release notes
needs: [build-android, build-ios]
needs: [build]
runs-on: ubuntu-latest
if: false
steps:
- name: Generate release notes
run: |
@ -76,14 +58,16 @@ jobs:
name: whatsnew-en-US
path: whatsnew-en-US.md
create-github-release:
name: Create Github release
needs: [generate-release-notes]
update-version-in-repo:
name: Update repo version
needs: [build]
runs-on: ubuntu-latest
if: false
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Increment build number & replace version number
run: bash ./.github/scripts/increment_build_number.sh ${{ github.event.inputs.version }}
@ -101,6 +85,14 @@ jobs:
branch: ${{ github.ref_name }}
unprotect_reviews: true
create-github-release:
name: Create Github release
needs: [build, generate-release-notes, update-version-in-repo]
runs-on: ubuntu-latest
if: false
permissions:
contents: write
steps:
- name: Download apk
uses: actions/download-artifact@v3
with:
@ -128,7 +120,7 @@ jobs:
create-google-play-release:
name: Create Google Play release
needs: [generate-release-notes]
needs: [build, generate-release-notes]
runs-on: ubuntu-latest
if: false
steps:
@ -196,23 +188,10 @@ jobs:
with:
name: m3_lightmeter_appbundle
create-app-store-release:
name: Create App Store release
needs: [generate-release-notes]
runs-on: macos-13
if: false
steps:
- run: echo "TODO"
cleanup:
name: Cleanup
if: ${{ always() }}
needs:
[
create-github-release,
create-google-play-release,
create-app-store-release,
]
needs: [create-github-release, create-google-play-release]
runs-on: ubuntu-latest
steps:
- name: Delete release notes artifact