-
-
Notifications
You must be signed in to change notification settings - Fork 38
79 lines (66 loc) · 2.48 KB
/
create_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
## See https://github.com/flutter/gallery/blob/main/.github/workflows/release_deploy_play_store.yml
name: Create new release
on:
# Enable manual run
workflow_dispatch:
inputs:
track:
description: "Google Play Track"
type: choice
default: beta
options:
- internal
- alpha
- beta
- production
is_draft:
description: "Mark as draft"
required: true
default: true
type: boolean
# Declare default permissions as read only.
permissions: read-all
jobs:
fastlane-publish-release:
name: "Deploy to Stores and create GitHub release"
runs-on: ubuntu-latest
steps:
- 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
with:
fetch-depth: 0
submodules: recursive
- name: Set FLUTTER_ROOT environment variable
run: echo "FLUTTER_ROOT=$(pwd)/flutter/bin" >> $GITHUB_ENV
- run: $FLUTTER_ROOT/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_with_submodule.sh
bash update_changelogs.sh
working-directory: scripts
- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.6"
bundler-cache: true
working-directory: android
- name: Build and publish artifacts
run: |
bundle exec fastlane publish_in_play_store track:${{ github.event.inputs.track }} is_draft:${{ github.event.inputs.is_draft }}
bundle exec fastlane github branch:${{ steps.extract_branch.outputs.branch }} is_draft:${{ github.event.inputs.is_draft }}
env:
PLAY_STORE_CREDENTIALS: ${{ secrets.PLAY_STORE_CREDENTIALS }}
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
working-directory: android