-
-
Notifications
You must be signed in to change notification settings - Fork 4
160 lines (137 loc) · 5.01 KB
/
all_deploy.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: All - Deploy
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
upload_to_stores:
description: "Should the build packages be uploaded to stores"
type : choice
required : true
default : "no"
options :
- "no"
- "beta"
upload_to_gh:
description: "Should the build packages be uploaded to a github release"
type : choice
required : true
default : "false"
options:
- "false"
- "true"
jobs:
static_checks:
uses: ./.github/workflows/static_checks.yml
cache_assets:
needs:
- static_checks
uses: ./.github/workflows/get_dakanji_assets.yml
android-test-and-build:
uses: ./.github/workflows/android_test_and_build.yml
needs:
- cache_assets
secrets:
KEY_PROPERTIES_KEY_PASSWORD: ${{ secrets.KEY_PROPERTIES_KEY_PASSWORD }}
KEY_PROPERTIES_STORE_PASSWORD: ${{ secrets.KEY_PROPERTIES_STORE_PASSWORD }}
KEY_PROPERTIES_KEY_ALIAS: ${{ secrets.KEY_PROPERTIES_KEY_ALIAS }}
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
#ios-test-and-build:
# needs:
# - cache_assets
# uses: ./.github/workflows/ios_test_and_build.yml
#secrets:
# SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
# POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
# POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
linux-test-and-build:
needs:
- cache_assets
uses: ./.github/workflows/linux_test_and_build.yml
secrets:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
#macos-test-and-build:
# needs:
# - cache_assets
# uses: ./.github/workflows/macos_test_and_build.yml
# secrets:
# SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
# POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
# POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
windows-test-and-build:
needs:
- cache_assets
uses: ./.github/workflows/windows_test_and_build.yml
secrets:
SELF_SIGN_MSIX_PFX: ${{secrets.SELF_SIGN_MSIX_PFX}}
SELF_SIGN_MSIX_PWD: ${{secrets.SELF_SIGN_MSIX_PWD}}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
create_github_release:
if: ${{github.event.inputs.upload_to_gh == 'true'}}
# upload to github releases after everything is build
needs:
- android-test-and-build
#- ios-test-and-build
- linux-test-and-build
#- macos-test-and-build
- windows-test-and-build
# The type of runner that the job will run on
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Set env variables
run: |
python3 .github/workflows/building.py set_env_flutter_version
python3 .github/workflows/building.py set_env_dakanji_version
- name: Create text files
run: |
python3 .github/workflows/building.py create_release_notes_txt
python3 .github/workflows/building.py create_latest_changes_txt
- name: delete previous beta releases
uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: gh_action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create github beta release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create gh_action \
--draft \
--notes-file release_notes.txt \
--title "$(head -n 1 latest_changes.txt)"
android-deploy:
needs: [create_github_release]
uses: ./.github/workflows/android_deploy.yml
with:
upload_to_gh : ${{github.event.inputs.upload_to_gh}}
upload_to_stores: ${{github.event.inputs.upload_to_stores}}
# ios
linux_deploy:
needs: [create_github_release]
uses: ./.github/workflows/linux_deploy.yml
with:
upload_to_gh : ${{github.event.inputs.upload_to_gh}}
upload_to_stores: ${{github.event.inputs.upload_to_stores}}
#macos_deploy:
# needs: [create_github_release]
# uses: ./.github/workflows/macos_deploy.yml
# with:
# upload_to_gh : ${{github.event.inputs.upload_to_gh}}
# upload_to_stores: ${{github.event.inputs.upload_to_stores}}
windows_deploy:
needs: [create_github_release]
uses: ./.github/workflows/windows_deploy.yml
with:
upload_to_gh : ${{github.event.inputs.upload_to_gh}}
upload_to_stores: ${{github.event.inputs.upload_to_stores}}