Skip to content

Commit

Permalink
ci: F-Droid iteration (#4244)
Browse files Browse the repository at this point in the history
* ci: Tagged flutter version

* typo

* version_code to release
  • Loading branch information
M123-dev authored Jun 28, 2023
1 parent 9250543 commit 08acce7
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,17 @@ jobs:
DECRYPT_GPG_KEYSTORE: ${{ secrets.DECRYPT_GPG_KEYSTORE }}
STORE_JKS_DECRYPTKEY: ${{ secrets.STORE_JKS_DECRYPTKEY }}

# Get the flutter version from ./flutter-version.txt
- run: echo "FLUTTER_VERSION=$(cat flutter-version.txt)" >> $GITHUB_OUTPUT
id: flutter-version

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
#channel: stable
cache: true
#flutter-version: '3.10.4'
cache-key: current-stable
flutter-version: ${{ steps.flutter-version.outputs.FLUTTER_VERSION }}
cache-key: flutter-${{ hashFiles('flutter-version.txt')}}-${{ hashFiles('packages\smooth_app\pubspec.lock')}}

- name: Flutter version
run: flutter --version
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/ios-release-to-org-openfoodfacts-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@ jobs:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}

# Get the flutter version from ./flutter-version.txt
- run: echo "FLUTTER_VERSION=$(cat flutter-version.txt)" >> $GITHUB_OUTPUT
id: flutter-version

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
#channel: stable
cache: true
#flutter-version: '3.10.4'
cache-key: current-stable
flutter-version: ${{ steps.flutter-version.outputs.FLUTTER_VERSION }}
cache-key: flutter-${{ hashFiles('flutter-version.txt')}}-${{ hashFiles('packages\smooth_app\pubspec.lock')}}

- name: Flutter version
run: flutter --version
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- "develop"

env:
FLUTTER_VERSION: '3.3.x'

jobs:
build:
Expand All @@ -24,13 +21,17 @@ jobs:
distribution: 'zulu'
java-version: 11

# Get the flutter version from ./flutter-version.txt
- run: echo "FLUTTER_VERSION=$(cat flutter-version.txt)" >> $GITHUB_OUTPUT
id: flutter-version

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
#channel: stable
cache: true
#flutter-version: '3.10.4'
cache-key: current-stable
flutter-version: ${{ steps.flutter-version.outputs.FLUTTER_VERSION }}
cache-key: flutter-${{ hashFiles('flutter-version.txt')}}-${{ hashFiles('packages\smooth_app\pubspec.lock')}}

- run: flutter --version

Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: SmoothApp Pre-Submit Tests
on:
pull_request:

env:
FLUTTER_VERSION: '3.3.x'

jobs:
build:
name: 'Analyze and test'
Expand All @@ -19,13 +16,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

# Get the flutter version from ./flutter-version.txt
- run: echo "FLUTTER_VERSION=$(cat flutter-version.txt)" >> $GITHUB_OUTPUT
id: flutter-version

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
#channel: stable
cache: true
#flutter-version: '3.10.4'
cache-key: current-stable
flutter-version: ${{ steps.flutter-version.outputs.FLUTTER_VERSION }}
cache-key: flutter-${{ hashFiles('flutter-version.txt')}}-${{ hashFiles('packages\smooth_app\pubspec.lock')}}

- run: flutter --version

Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ jobs:
message: "Public release: ${{ env.VERSION_NAME }}+${{ env.VERSION_CODE }}"
force_push_tag: true

# We need to add the VERSION_CODE to the release in order for F-Droid to have the same VERSION_CODE as the other Stores
- name: Create version file
run: echo ${{ env.VERSION_CODE }} > "./version-code.txt"

- name: Upload version code to release
uses: svenstaro/upload-release-action@v2
with:
file: ./version-code.txt
tag: "v${{ env.VERSION_NAME }}"
overwrite: true

- 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 }}"
Expand Down
1 change: 1 addition & 0 deletions flutter-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10.5

0 comments on commit 08acce7

Please sign in to comment.