All - Deploy #155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} | |