diff --git a/.github/actions/setup-android-signing-config/action.yml b/.github/actions/setup-android-signing-config/action.yml index 1a22650..6da915c 100644 --- a/.github/actions/setup-android-signing-config/action.yml +++ b/.github/actions/setup-android-signing-config/action.yml @@ -16,6 +16,10 @@ inputs: keystore-store-password: description: 'key.properties storePassword' required: true + output-directory: + description: The directory of the project + required: true + runs: using: "composite" steps: @@ -26,5 +30,7 @@ runs: echo "keyAlias=${{ inputs.keystore-key-alias }}" >> key.properties echo "storePassword=${{ inputs.keystore-store-password }}" >> key.properties echo "keyPassword=${{ inputs.keystore-key-password }}" >> key.properties + cp key.properties ${{ inputs.output-directory }}/key.properties + cp ${{ inputs.keystore-key-alias }}-keystore.jks ${{ inputs.output-directory }}/${{ inputs.keystore-key-alias }}-keystore.jks shell: bash working-directory: android \ No newline at end of file diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index dbcc182..06def2e 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -35,11 +35,9 @@ jobs: run: | mkdir -p /tmp/build cp -R . /tmp/build - echo "PROJECT_ROOT=/tmp/build" >> $GITHUB_ENV - name: Set FLUTTER_ROOT environment variable and build dir - run: echo "FLUTTER_ROOT=$(pwd)/flutter/bin" >> $GITHUB_ENV - working-directory: $PROJECT_ROOT + run: echo "FLUTTER_ROOT=/tmp/build/flutter/bin" >> $GITHUB_ENV - run: $FLUTTER_ROOT/flutter doctor -v @@ -51,21 +49,23 @@ jobs: keystore-store-password: ${{ secrets.KEYSTORE_STORE_PASSWORD }} release-keystore: ${{ secrets.RELEASE_KEYSTORE }} release-keystore-passphrase: ${{ secrets.RELEASE_KEYSTORE_PASSPHRASE }} + output-directory: /tmp/build/android - name: Get packages and run codegen run: | - bash ./scripts/install_dependencies_with_submodule.sh - bash ./scripts/update_changelogs.sh - working-directory: $PROJECT_ROOT + bash /tmp/build/scripts/install_dependencies_with_submodule.sh + bash /tmp/build/scripts/update_changelogs.sh - name: Setup Fastlane uses: ruby/setup-ruby@v1 with: ruby-version: "2.6" bundler-cache: true - working-directory: $PROJECT_ROOT/android - - - run: bundle exec fastlane github branch:${{ steps.extract_branch.outputs.branch }} is_draft:${{ github.event.inputs.is_draft }} + working-directory: /tmp/build/android + + - name: Build and publish GitHub release + run: | + cd /tmp/build/android + bundle exec fastlane github branch:${{ steps.extract_branch.outputs.branch }} is_draft:${{ github.event.inputs.is_draft }} env: GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} - working-directory: $PROJECT_ROOT/android