-
-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the way the releases are built
- Loading branch information
1 parent
02eea70
commit 9641651
Showing
26 changed files
with
1,525 additions
and
90 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: 'Flutter common setup' | ||
description: 'Common steps needed to setup the application' | ||
inputs: | ||
flutter-version: | ||
description: 'flutter version' | ||
required: true | ||
java-version: | ||
description: 'java version' | ||
required: true | ||
ruby-version: | ||
description: 'ruby version' | ||
required: true | ||
decrypt-playstore: | ||
required: false | ||
default: 'false' | ||
key-playstore: | ||
required: true | ||
key-playstore-sign: | ||
required: true | ||
key-properties: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ inputs.java-version }} | ||
distribution: 'oracle' | ||
cache: 'gradle' | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: stable | ||
flutter-version: ${{ inputs.flutter-version }} | ||
cache: true | ||
|
||
- name: Install Flutter dependencies | ||
run: flutter pub get | ||
shell: bash | ||
|
||
- name: Decrypt config files | ||
if: ${{ inputs.decrypt-playstore == 'true' }} | ||
run: | | ||
cd ./fastlane/metadata/envfiles | ||
chmod +x ./decrypt_secrets.sh | ||
./decrypt_secrets.sh | ||
shell: bash | ||
env: | ||
DECRYPTKEY_PLAYSTORE: ${{ inputs.key-playstore }} | ||
DECRYPTKEY_PLAYSTORE_SIGNING_KEY: ${{ inputs.key-playstore-sign }} | ||
DECRYPTKEY_PROPERTIES: ${{ inputs.key-properties }} | ||
|
||
- name: Extract version information | ||
run: | | ||
echo "VERSION_V=v1.2.3" >> $GITHUB_ENV | ||
echo "VERSION=1.2.3" >> $GITHUB_ENV | ||
echo "BUILD=$(flutter pub run cider version | cut -d '+' -f 2)" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
#GITHUB_REF_NAME | ||
# echo "VERSION_V=$(echo $GITHUB_REF_NAME)" >> $GITHUB_ENV | ||
# echo "VERSION=$(echo $GITHUB_REF_NAME | cut -c 2-)" >> $GITHUB_ENV | ||
|
||
- name: Bump pubspec version | ||
run: | | ||
flutter pub run cider version ${{ env.VERSION }}+${{ env.BUILD }} | ||
flutter pub run cider bump build | ||
shell: bash |
Oops, something went wrong.