Skip to content

Commit

Permalink
Merge branch 'develop' into 770/product-brands-commas
Browse files Browse the repository at this point in the history
  • Loading branch information
M123-dev authored Oct 5, 2022
2 parents 1f0a6cf + de3b7bb commit 417358b
Show file tree
Hide file tree
Showing 142 changed files with 4,114 additions and 1,859 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/android-release-to-org-openfoodfacts-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ on:
VERSION_CODE:
required: true
type: string
# 'PLAY' or
# 'GITHUB' (requires [RELEASE_TAG] for the gh release to push to)
RELEASE_TYPE:
required: true
type: string
# 'apk' or 'appbundle'
BUILD_TYPE:
required: true
type: string
TAG_NAME:
required: false
type: string
secrets:
API_JSON_FILE_DECRYPTKEY:
required: true
Expand Down Expand Up @@ -82,16 +94,27 @@ jobs:
VERSION_NAME: ${{ inputs.VERSION_NAME }}
VERSION_CODE: ${{ inputs.VERSION_CODE }}

- name: Build AAB
run: echo $SIGN_STORE_PATH && pwd && cd ./packages/smooth_app/ && pwd && flutter build appbundle --release
- name: Build app
run: echo $SIGN_STORE_PATH && pwd && cd ./packages/smooth_app/ && pwd && flutter build ${{ github.event.inputs.BUILD_TYPE }} --release
env:
SIGN_STORE_PATH: ./../fastlane/envfiles/keystore.jks
SIGN_STORE_PASSWORD: ${{ secrets.SIGN_STORE_PASSWORD }}
SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }}
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
if: github.event.inputs.RELEASE_TYPE == 'GITHUB' && github.event.inputs.BUILD_TYPE == 'apk' && github.event.inputs.TAG_NAME != ''
continue-on-error: true
with:
file: ./packages/smooth_app/build/app/outputs/flutter-apk/app-release.apk
asset_name: android-release-${{ inputs.TAG_NAME }}.apk
tag: ${{ inputs.TAG_NAME }}
overwrite: true

- name: Release AAB
uses: maierj/[email protected]
if: github.event.inputs.RELEASE_TYPE == 'PLAY' && github.event.inputs.BUILD_TYPE == 'appbundle'
with:
lane: release
subdirectory: packages/smooth_app/android
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/internal-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
concurrency:
group: release
cancel-in-progress: true
if: "!contains(github.event.commits[0].message, 'chore(develop): release')"
if: "!contains(github.event.commits[0].message, 'chore(develop): release') && github.owner == openfoodfacts"
runs-on: ubuntu-latest
outputs:
VERSION_NAME: ${{ steps.set_output.outputs.VERSION_NAME }}
Expand Down Expand Up @@ -49,9 +49,11 @@ jobs:

- name: Tag commit
uses: rickstaa/action-create-tag@v1
continue-on-error: true
with:
tag: "${{ env.NORMALIZED_TAG }}"
message: "Internal release: ${{ env.VERSION_NAME }}-${{ env.VERSION_CODE }}"
force_push_tag: true

- name: Set output
id: set_output
Expand All @@ -64,9 +66,11 @@ jobs:
uses: openfoodfacts/smooth-app/.github/workflows/android-release-to-org-openfoodfacts-scanner.yml@develop
needs: tag-commit
with:
VERSION_NAME: ${{ needs.create-release.outputs.VERSION_NAME}}
VERSION_CODE: ${{ needs.create-release.outputs.VERSION_CODE}}
VERSION_NAME: ${{ needs.tag-commit.outputs.VERSION_NAME}}
VERSION_CODE: ${{ needs.tag-commit.outputs.VERSION_CODE}}
FLUTTER-CACHE-KEY: '3.3.x'
RELEASE_TYPE: 'PLAY'
BUILD_TYPE: 'appbundle'
secrets:
API_JSON_FILE_DECRYPTKEY: ${{secrets.API_JSON_FILE_DECRYPTKEY }}
DECRYPT_GPG_KEYSTORE: ${{secrets.DECRYPT_GPG_KEYSTORE }}
Expand All @@ -82,8 +86,8 @@ jobs:
uses: openfoodfacts/smooth-app/.github/workflows/ios-release-to-org-openfoodfacts-scanner.yml@develop
needs: tag-commit
with:
VERSION_NAME: ${{ needs.create-release.outputs.VERSION_NAME}}
VERSION_CODE: ${{ needs.create-release.outputs.VERSION_CODE}}
VERSION_NAME: ${{ needs.tag-commit.outputs.VERSION_NAME}}
VERSION_CODE: ${{ needs.tag-commit.outputs.VERSION_CODE}}
FLUTTER-CACHE-KEY: '3.3.x'
secrets:
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN }}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ on:
jobs:
release-please:
runs-on: ubuntu-latest
if: github.owner == openfoodfacts
outputs:
release_created: ${{ steps.release_please.outputs.release_created }}
major: ${{ steps.release_please.outputs.major }}
minor: ${{ steps.release_please.outputs.minor }}
patch: ${{ steps.release_please.outputs.patch }}
tag_name: ${{ steps.release_please.outputs.tag_name }}
steps:
- name: Release-please
uses: google-github-actions/release-please-action@v3
Expand Down Expand Up @@ -74,6 +76,8 @@ jobs:
VERSION_NAME: ${{ needs.create-release.outputs.VERSION_NAME}}
VERSION_CODE: ${{ needs.create-release.outputs.VERSION_CODE}}
FLUTTER-CACHE-KEY: '3.3.x'
RELEASE_TYPE: 'PLAY'
BUILD_TYPE: 'appbundle'
secrets:
API_JSON_FILE_DECRYPTKEY: ${{secrets.API_JSON_FILE_DECRYPTKEY }}
DECRYPT_GPG_KEYSTORE: ${{secrets.DECRYPT_GPG_KEYSTORE }}
Expand Down Expand Up @@ -105,3 +109,25 @@ jobs:
SPACESHIP_CONNECT_API_ISSUER_ID: ${{secrets.SPACESHIP_CONNECT_API_ISSUER_ID }}
SPACESHIP_CONNECT_API_KEY_ID: ${{secrets.SPACESHIP_CONNECT_API_KEY_ID }}
AUTH_KEY_FILE_DECRYPTKEY: ${{ secrets.AUTH_KEY_FILE_DECRYPTKEY }}

android-release-github:
concurrency:
group: android-release-github
cancel-in-progress: false
uses: openfoodfacts/smooth-app/.github/workflows/android-release-to-org-openfoodfacts-scanner.yml@develop
needs: [release-please, create-release]
if: ${{ needs.release-please.outputs.release_created }}
with:
VERSION_NAME: ${{ needs.create-release.outputs.VERSION_NAME}}
VERSION_CODE: ${{ needs.create-release.outputs.VERSION_CODE}}
FLUTTER-CACHE-KEY: '3.3.x'
RELEASE_TYPE: 'GITHUB'
BUILD_TYPE: 'apk'
TAG_NAME: ${{ needs.create-release.outputs.tag_name}}
secrets:
API_JSON_FILE_DECRYPTKEY: ${{secrets.API_JSON_FILE_DECRYPTKEY }}
DECRYPT_GPG_KEYSTORE: ${{secrets.DECRYPT_GPG_KEYSTORE }}
STORE_JKS_DECRYPTKEY: ${{secrets.NEW_CYPHER }}
SIGN_STORE_PASSWORD: ${{secrets.DECRYPT_FOR_SCANNER_FILE }}
SIGN_KEY_ALIAS: ${{secrets.ALIAS_FOR_SCANNER }}
SIGN_KEY_PASSWORD: ${{secrets.KEY_FOR_SCANNER }}
1 change: 1 addition & 0 deletions .github/workflows/update-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
update-assets:
if: github.owner == openfoodfacts
runs-on: ubuntu-latest

steps:
Expand Down
Empty file modified ci/update_assets.sh
100644 → 100755
Empty file.
Loading

0 comments on commit 417358b

Please sign in to comment.