send email done #35
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: Flutter Deploy | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
build_and_deploy_web: | |
name: Build & Deploy Flutter to Web | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: 🌍 Enable Web | |
run: flutter config --enable-web | |
- name: 📦 Get packages | |
run: flutter pub get | |
- name: 🏭 Build Web Application | |
run: flutter build web --release | |
- name: Make copy of artifacts | |
run: | | |
chmod u+x "${GITHUB_WORKSPACE}/createandcopytofolder.sh" | |
bash "${GITHUB_WORKSPACE}/createandcopytofolder.sh" | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Commit the artifacts. | |
build_release_apk: | |
name: Build Release APK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Get Flutter packages | |
run: flutter pub get | |
- name: Print working directory | |
run: pwd | |
- name: List files in working directory | |
run: ls -al | |
- name: Check Flutter SDK version | |
run: flutter --version | |
- name: Build Android APK | |
run: flutter build apk --release | |
- name: Upload APK artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-apk | |
path: build/app/outputs/flutter-apk/app-release.apk | |
- name: Commit changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add -f build/app/outputs/flutter-apk/app-release.apk | |
git commit -m "Add release APK" | |
git pull origin main --rebase | |
git push origin main |