From 9121e52322a1f5da397e1cbcb8971289a67be138 Mon Sep 17 00:00:00 2001 From: Anton Stubenbord Date: Fri, 28 Apr 2023 00:02:30 +0200 Subject: [PATCH] feat: Split github release workflow and upload to play store --- .github/workflows/create-github-release.yml | 59 +++++++++++++++++++ ...tore.yml => release-deploy-play-store.yml} | 50 +--------------- 2 files changed, 61 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/create-github-release.yml rename .github/workflows/{release_deploy_play_store.yml => release-deploy-play-store.yml} (56%) diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml new file mode 100644 index 0000000..2116e25 --- /dev/null +++ b/.github/workflows/create-github-release.yml @@ -0,0 +1,59 @@ +name: Create GitHub Release +on: + # Enable manual run + workflow_dispatch: + inputs: + is_draft: + description: "Only create a draft and don't automatically publish?" + required: true + default: true + type: boolean + +# Declare default permissions as read only. +permissions: read-all + +jobs: + create-github-release: + runs-on: ubuntu-latest + steps: + # Setup Ruby, Bundler, and Gemfile dependencies + + - name: Extract branch name + shell: bash + run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT + id: extract_branch + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Clone flutter repository + uses: subosito/flutter-action@v2 + with: + channel: stable + - run: flutter doctor -v + + - name: Setup signing config + uses: ./.github/actions/setup-android-signing-config + with: + keystore-key-alias: ${{ secrets.KEYSTORE_KEY_ALIAS }} + keystore-key-password: ${{ secrets.KEYSTORE_KEY_PASSWORD }} + keystore-store-password: ${{ secrets.KEYSTORE_STORE_PASSWORD }} + release-keystore: ${{ secrets.RELEASE_KEYSTORE }} + release-keystore-passphrase: ${{ secrets.RELEASE_KEYSTORE_PASSPHRASE }} + + - name: Get packages and run codegen + run: | + bash install_dependencies.sh + working-directory: scripts + + - name: Setup Fastlane + uses: ruby/setup-ruby@v1 + with: + ruby-version: "2.6" + bundler-cache: true + working-directory: android + + - run: 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: android diff --git a/.github/workflows/release_deploy_play_store.yml b/.github/workflows/release-deploy-play-store.yml similarity index 56% rename from .github/workflows/release_deploy_play_store.yml rename to .github/workflows/release-deploy-play-store.yml index 4255b6e..2eb0eba 100644 --- a/.github/workflows/release_deploy_play_store.yml +++ b/.github/workflows/release-deploy-play-store.yml @@ -1,6 +1,6 @@ ## See https://github.com/flutter/gallery/blob/main/.github/workflows/release_deploy_play_store.yml -name: Create Release +name: Release on Play Store on: # Enable manual run workflow_dispatch: @@ -69,50 +69,4 @@ jobs: env: PLAY_STORE_CREDENTIALS: ${{ secrets.PLAY_STORE_CREDENTIALS }} working-directory: android - - create-github-release: - name: "Create GitHub Release" - runs-on: ubuntu-latest - steps: - # Setup Ruby, Bundler, and Gemfile dependencies - - - name: Extract branch name - shell: bash - run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT - id: extract_branch - - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Clone flutter repository - uses: subosito/flutter-action@v2 - with: - channel: stable - - run: flutter doctor -v - - - name: Setup signing config - uses: ./.github/actions/setup-android-signing-config - with: - keystore-key-alias: ${{ secrets.KEYSTORE_KEY_ALIAS }} - keystore-key-password: ${{ secrets.KEYSTORE_KEY_PASSWORD }} - keystore-store-password: ${{ secrets.KEYSTORE_STORE_PASSWORD }} - release-keystore: ${{ secrets.RELEASE_KEYSTORE }} - release-keystore-passphrase: ${{ secrets.RELEASE_KEYSTORE_PASSPHRASE }} - - - name: Get packages and run codegen - run: | - bash install_dependencies.sh - working-directory: scripts - - - name: Setup Fastlane - uses: ruby/setup-ruby@v1 - with: - ruby-version: "2.6" - bundler-cache: true - working-directory: android - - - run: 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: android - + \ No newline at end of file