Skip to content

add github workflow release #3

add github workflow release

add github workflow release #3

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Clipious release
# Controls when the workflow will run
on:
push:
branches:
- 'master'
# Pattern matched against refs/tags
tags:
- '**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: flutter release
# The type of runner that the job will run on
runs-on: ubuntu-latest
#env:
# JAVA_VERSION: "11.0"
# FLUTTER_VERSION: "2.5.3"
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.11
- name: Install nix packages for bundle tools
run: nix-env -iA bundletool aapt android-tools
- name: Create keystore.jks
run: echo ${{ secrets.KEYSTORE_BASE^$ }} | base64 -d > /tmp/keystore.jks

Check failure on line 34 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Clipious release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 34, Col: 14): Unexpected symbol: 'KEYSTORE_BASE^$'. Located at position 9 within expression: secrets.KEYSTORE_BASE^$
- name: Create key.properties
run: |
echo "storeFile=/tmp/keystore.jks" > /tmp/key.properties
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> /tmp/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> /tmp/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> /tmp/key.properties
- run: git submodule init
- run: git submodule update
- run: set -e
- run: cp -R ./ /tmp/build
- working-directory: /tmp/build
run: |
ls
ls /tmp
pwd
git submodule init
git submodule update
export PUB_CACHE=$(pwd)/.pub-cache
./submodules/flutter/bin/flutter doctor
./submodules/flutter/bin/flutter config --no-analytics
./submodules/flutter/bin/flutter pub get
./submodules/flutter/bin/flutter pub run flutter_native_splash:create
./submodules/flutter/bin/flutter build apk --split-per-abi
./submodules/flutter/bin/flutter build apk
./submodules/flutter/bin/flutter build appbundle
- run: mkdir -p build/app/outputs/flutter-apk
- run: mkdir -p build/app/outputs/bundle/release
- run: cp /tmp/build/build/app/outputs/flutter-apk/* build/app/outputs/flutter-apk/
- run: cp /tmp/build/build/app/outputs/bundle/release/* build/app/outputs/bundle/release/
- run: ls build/app/outputs/flutter-apk/
- run: ls build/app/outputs/bundle/release/
- name: Create apks file
run: bundletool build-apks --bundle=build/app/outputs/bundle/release/app-release.aab --output=build/app/outputs/bundle/release/app-release.apks --ks-pass=pass:${{ secrets.STORE_PASSWORD }} --ks=/tmp/keystore.jks --ks-key-alias=upload --key-pass=pass:${{ secrets.KEY_PASSWORD }} --aapt2=$(which aapt2)
# - name: Upload binaries to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: target/release/my*
# tag: ${{ github.ref }}
# overwrite: true
# file_glob: true