-
-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Create internal release on every commit (#2983)
* ci: Create internal release on every commit * Added concurrency to avoid dublicate releases * Update .github/workflows/internal-release.yml Co-authored-by: Pierre Slamich <[email protected]> Co-authored-by: Pierre Slamich <[email protected]>
- Loading branch information
Showing
5 changed files
with
119 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,7 +93,7 @@ jobs: | |
- name: Release AAB | ||
uses: maierj/[email protected] | ||
with: | ||
lane: closed_beta | ||
lane: release | ||
subdirectory: packages/smooth_app/android | ||
env: | ||
SIGN_STORE_PATH: ./../fastlane/envfiles/keystore.jks | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: Create internal releases | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
|
||
jobs: | ||
tag-commit: | ||
concurrency: | ||
group: release | ||
cancel-in-progress: true | ||
if: "!contains(github.event.commits[0].message, 'chore(develop): release')" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
VERSION_NAME: ${{ steps.set_output.outputs.VERSION_NAME }} | ||
VERSION_CODE: ${{ steps.set_output.outputs.VERSION_CODE }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Get the latest version name from file | ||
- name: Set VERSION_NAME env | ||
run: echo "VERSION_NAME=$(cat version.txt)>> $GITHUB_ENV | ||
#run: echo "VERSION_NAME=1.9.0" >> $GITHUB_ENV | ||
|
||
- name: Decrypt Android API JSON file | ||
run: cd ./packages/smooth_app/android/fastlane/envfiles && chmod +x ./decrypt_secrets.sh && ./decrypt_secrets.sh | ||
env: | ||
API_JSON_FILE_DECRYPTKEY: ${{ secrets.API_JSON_FILE_DECRYPTKEY }} | ||
DECRYPT_GPG_KEYSTORE: ${{ secrets.DECRYPT_GPG_KEYSTORE }} | ||
STORE_JKS_DECRYPTKEY: ${{ secrets.NEW_CYPHER }} | ||
|
||
# We are using the Android version code for iOS as well to have the version codes in sync | ||
# in order for Sentry and other tools to work properly | ||
# Outputs env: VERSION_CODE (integer) | ||
- name: Get latest VERSION_CODE | ||
uses: maierj/[email protected] | ||
with: | ||
lane: getOldVersionCode | ||
subdirectory: packages/smooth_app/android | ||
|
||
- name: Version | ||
run: echo "${{ env.VERSION_NAME }}+${{ env.VERSION_CODE }}" | ||
|
||
- name: Tag commit | ||
uses: rickstaa/action-create-tag@v1 | ||
with: | ||
tag: "Internal: ${{ env.VERSION_NAME }}+${{ env.VERSION_CODE }}" | ||
message: "Internal release: ${{ env.VERSION_NAME }}+${{ env.VERSION_CODE }}" | ||
|
||
- name: Set output | ||
id: set_output | ||
run: echo "::set-output name=VERSION_NAME::${{ env.VERSION_NAME }}" && echo "::set-output name=VERSION_CODE::${{ env.VERSION_CODE }}" | ||
|
||
android-release: | ||
concurrency: | ||
group: android-release | ||
cancel-in-progress: true | ||
uses: openfoodfacts/smooth-app/.github/workflows/android-release-main.yml@develop | ||
needs: tag-commit | ||
with: | ||
VERSION_NAME: ${{ needs.create-release.outputs.VERSION_NAME}} | ||
VERSION_CODE: ${{ needs.create-release.outputs.VERSION_CODE}} | ||
FLUTTER-CACHE-KEY: '3.3.x' | ||
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 }} | ||
|
||
iOS-release: | ||
concurrency: | ||
group: iOS-release | ||
cancel-in-progress: true | ||
uses: openfoodfacts/smooth-app/.github/workflows/ios-release-main.yml@develop | ||
needs: tag-commit | ||
with: | ||
VERSION_NAME: ${{ needs.create-release.outputs.VERSION_NAME}} | ||
VERSION_CODE: ${{ needs.create-release.outputs.VERSION_CODE}} | ||
FLUTTER-CACHE-KEY: '3.3.x' | ||
secrets: | ||
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN }} | ||
FASTLANE_USER: ${{secrets.FASTLANE_USER }} | ||
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }} | ||
MATCH_GIT_BASIC_AUTHORIZATION: ${{secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | ||
MATCH_GIT_URL: ${{secrets.MATCH_GIT_URL }} | ||
MATCH_KEYCHAIN_PASSWORD: ${{secrets.MATCH_KEYCHAIN_PASSWORD }} | ||
MATCH_PASSWORD: ${{secrets.MATCH_PASSWORD }} | ||
PILOT_APPLE_ID: ${{secrets.PILOT_APPLE_ID }} | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters