This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (78 loc) · 3.21 KB
/
main-pushes.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
80
81
82
83
84
85
name: mobile deployment
on:
push:
branches:
- main
paths:
- mobile/app/**
- mobile/core/**
- mobile/core_ui/**
- mobile/weather/**
workflow_dispatch:
jobs:
deploy-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{secrets.SSH_PRIVATE_KEY}}
- uses: subosito/flutter-action@v2.4.0
with:
flutter-version: '3.7.0'
channel: stable
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- run: cd mobile/app && bundle install
- uses: paulhatch/semantic-version@v5.0.0-alpha2
id: calculate_version_name
with:
tag_prefix: "v"
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
version_format: "${major}.${minor}.${patch}"
- run: cd mobile/app/ios && bundle exec fastlane deploy
env:
MATCH_PASSWORD: ${{secrets.MATCH_PASSWORD}}
MATCH_KEYCHAIN_PASSWORD: ${{secrets.MATCH_PASSWORD}}
OPEN_WEATHER_MAP_API_KEY: ${{secrets.OPEN_WEATHER_MAP_API_KEY}}
BASE_URL: ${{secrets.BASE_URL}}
APP_STORE_CONNECT_API_KEY_KEY: ${{secrets.APP_STORE_CONNECT_API_KEY}}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{secrets.APP_STORE_CONNECT_API_KEY_ID}}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{secrets.APP_STORE_CONNECT_API_KEY_ISSUER}}
VERSION_NAME: ${{ steps.calculate_version_name.outputs.version }}
BUILD_NUMBER: ${{ steps.calculate_version_name.outputs.increment }}
- run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- run: "git tag v${{ steps.calculate_version_name.outputs.version }} -a -m \"Updated to ${{ steps.calculate_version_name.outputs.version }}\""
- run: "git push --tags"
# deploy-android:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# - uses: webfactory/ssh-agent@v0.5.3
# with:
# ssh-private-key: ${{secrets.SSH_PRIVATE_KEY}}
# - uses: subosito/flutter-action@v1
# with:
# flutter-version: '3.0.4'
# channel: stable
# - name: Bundle install
# run: cd mobile/app && bundle install
# - name: Decode keystore file
# run: echo "${{secrets.ANDROID_UPLOAD_KEYSTORE_FILE}}" | base64 --decode > ${{secrets.ANDROID_KEYSTORE_PATH}}
# working-directory: mobile/app/android/app
# - name: Deploy Android to Beta
# env:
# ANDROID_KEYSTORE_PATH: ${{secrets.ANDROID_KEYSTORE_PATH}}
# ANDROID_KEYSTORE_ALIAS: ${{secrets.ANDROID_KEYSTORE_ALIAS}}
# ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD: ${{secrets.ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD}}
# ANDROID_KEYSTORE_PASSWORD: ${{secrets.ANDROID_KEYSTORE_PASSWORD}}
# ANDROID_SECRET_JSON_FILE: ${{secrets.ANDROID_SECRET_JSON_FILE}}
# OPEN_WEATHER_MAP_API_KEY: ${{secrets.OPEN_WEATHER_MAP_API_KEY}}
# BASE_URL: ${{secrets.BASE_URL}}
# run: cd mobile/app/android && bundle exec fastlane deploy