Testa, builda e rilascia un apk #30
Workflow file for this run
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
on: | |
push: | |
tags: | |
- "v*" | |
name: Testa, builda e rilascia un apk | |
jobs: | |
build: | |
name: Genera l'apk | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
- name: Prepara i file per la firma | |
env: | |
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} | |
STORE_FILE: ${{ secrets.STORE_FILE }} | |
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
run: | | |
touch android/key.properties | |
echo "storePassword=$STORE_PASSWORD" >> android/key.properties | |
echo "keyPassword=$KEY_PASSWORD" >> android/key.properties | |
echo "keyAlias=bookaround" >> android/key.properties | |
echo "storeFile=../../$STORE_FILE" >> android/key.properties | |
gpg --quiet --batch --yes --decrypt --passphrase="$GPG_PASSWORD" --output $STORE_FILE "$STORE_FILE.gpg" | |
- run: flutter pub get | |
- run: flutter test | |
- run: flutter build apk | |
- name: Elimina le tracce | |
env: | |
STORE_FILE: ${{ secrets.STORE_FILE }} | |
run: | | |
rm $STORE_FILE | |
rm android/key.properties | |
- name: Rilascia un apk | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/app/outputs/apk/release/*.apk" | |
token: ${{ secrets.TOKEN }} |