Skip to content

CharlVS is deploying a preview build to Firebase Hosting πŸš€ #10

CharlVS is deploying a preview build to Firebase Hosting πŸš€

CharlVS is deploying a preview build to Firebase Hosting πŸš€ #10

# Deploys a preview build to Firebase Hosting when a pull request is opened, synchronized, or reopened
name: Deploy to Firebase Hosting on PR
run-name: ${{ github.actor }} is deploying a preview build to Firebase Hosting πŸš€
on:
pull_request:
branches:
- dev
- main
- release/*
workflow_dispatch:
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: Shortify commit sha
shell: bash
run: echo "sha_short=$(echo ${GITHUB_SHA::7})" >> $GITHUB_OUTPUT
id: shortify_commit
- name: Get branch
shell: bash
run: echo "ref_short=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT
id: get_branch
- name: Get Preview Channel ID
shell: bash
run: echo "preview_channel_id=$(echo ${GITHUB_REF#*/})" >> $GITHUB_OUTPUT
id: get_preview_channel_id
- name: Setup GH Actions
uses: actions/checkout@v4
- name: Install Flutter and dependencies
uses: ./.github/actions/flutter-deps
- name: Fetch packages and generate assets
uses: ./.github/actions/generate-assets
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Validate build
uses: ./.github/actions/validate-build
- name: Deploy Komodo Wallet web feature preview (Expires in 7 days)
uses: FirebaseExtended/[email protected]
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_KOMODO_WALLET_OFFICIAL }}"
channelId: "${{ steps.get_preview_channel_id.outputs.preview_channel_id }}"
target: walletrc
expires: 7d
projectId: komodo-wallet-official
- name: Deploy Komodo Wallet Web dev preview (`dev` branch)
if: github.ref == 'refs/heads/dev' && github.event_name != 'workflow_dispatch'
uses: FirebaseExtended/[email protected]
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_KOMODO_WALLET_OFFICIAL }}"
channelId: dev-preview
target: walletrc
projectId: komodo-wallet-official