Skip to content

Commit

Permalink
ci: Major release update fix (#2811)
Browse files Browse the repository at this point in the history
* first commit calling ios and android release from release please

* fix

* Update presubmit.yml

* Update presubmit.yml

* Codecov

* Update release-please.yml

* Update CONTRIBUTING.md

* FLUTTER-CACHE-KEY

* Fix use OLD_VERSION_CODE env

* Release-please add support for more types

* Update semantic-pr.yml

* Comment out (hopefully) un-needed second build step

* Update release-please.yml

* Update release-please.yml

* Update release-please.yml

* Update ios-release-to-org-openfoodfacts-scanner.yml

* Update release-please.yml

* pass github token

* no github token
  • Loading branch information
M123-dev authored Aug 20, 2022
1 parent c4ccd79 commit bbe5635
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
VERSION_NAME:
required: true
type: string
VERSION_CODE:
OLD_VERSION_CODE:
required: true
type: string
secrets:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
subdirectory: packages/smooth_app/android
env:
VERSION_NAME: ${{ env.VERSION_NAME }}
VERSION_CODE: ${{ env.OLD_VERSION_CODE }}
OLD_VERSION_CODE: ${{ env.OLD_VERSION_CODE }}

- name: Build app
run: cd ./packages/smooth_app && cd ios && pod update Sentry && cd .. && flutter build ios --release --no-codesign
Expand Down
35 changes: 20 additions & 15 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ on:
push:
branches:
- develop

env:
FLUTTER-CACHE-KEY: '3.0.1'
- major-release-update

jobs:

Expand All @@ -22,6 +20,10 @@ jobs:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
outputs:
VERSION_NAME: ${{ steps.set_output.outputs.VERSION_NAME }}
OLD_VERSION_CODE: ${{ steps.set_output.outputs.OLD_VERSION_CODE }}

steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -49,19 +51,23 @@ jobs:
run: echo ${{ env.RELEASE_VERSION }}

- name: Tag commit
id: ${{ env.RELEASE_VERSION }}
uses: mathieudutour/github-tag-action@v6.0
uses: rickstaa/action-create-tag@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.RELEASE_VERSION }}
message: "Release: ${{ env.RELEASE_VERSION }}"

- name: Set output
id: set_output
run: echo "::set-output name=VERSION_NAME::${{ env.VERSION_NAME }}" && echo "::set-output name=OLD_VERSION_CODE::${{ env.OLD_VERSION_CODE }}"

android-release:
uses: openfoodfacts/smooth-app/.github/workflows/android-release-to-org-openfoodfacts-scanner.yml@develop
uses: openfoodfacts/smooth-app/.github/workflows/android-release-to-org-openfoodfacts-scanner.yml@major-release-update
needs: [release-please, create-release]
if: ${{ needs.release-please.outputs.release_created }}
with:
VERSION_NAME: ${{ env.VERSION_NAME }}
FLUTTER-CACHE-KEY: ${{ env.FLUTTER-CACHE-KEY }}
OLD_VERSION_CODE: ${{ env.OLD_VERSION_CODE }}
VERSION_NAME: ${{ needs.create-release.outputs.VERSION_NAME}}
OLD_VERSION_CODE: ${{ needs.create-release.outputs.OLD_VERSION_CODE}}
FLUTTER-CACHE-KEY: '3.0.1'
secrets:
API_JSON_FILE_DECRYPTKEY: ${{secrets.API_JSON_FILE_DECRYPTKEY }}
DECRYPT_GPG_KEYSTORE: ${{secrets.DECRYPT_GPG_KEYSTORE }}
Expand All @@ -71,15 +77,14 @@ jobs:
SIGN_KEY_PASSWORD: ${{secrets.SIGN_KEY_PASSWORD }}

iOS-release:
uses: openfoodfacts/smooth-app/.github/workflows/ios-release-to-org-openfoodfacts-scanner.yml@develop
uses: openfoodfacts/smooth-app/.github/workflows/ios-release-to-org-openfoodfacts-scanner.yml@major-release-update
needs: [release-please, create-release]
if: ${{ needs.release-please.outputs.release_created }}
with:
VERSION_NAME: ${{ env.VERSION_NAME }}
FLUTTER-CACHE-KEY: ${{ env.FLUTTER-CACHE-KEY }}
OLD_VERSION_CODE: ${{ env.OLD_VERSION_CODE }}
VERSION_NAME: ${{ needs.create-release.outputs.VERSION_NAME}}
OLD_VERSION_CODE: ${{ needs.create-release.outputs.OLD_VERSION_CODE}}
FLUTTER-CACHE-KEY: '3.0.1'
secrets:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN }}
FASTLANE_USER: ${{secrets.FASTLANE_USER }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
Expand Down

0 comments on commit bbe5635

Please sign in to comment.