Skip to content

⬆️ Bump actions/download-artifact from 3 to 4 #35

⬆️ Bump actions/download-artifact from 3 to 4

⬆️ Bump actions/download-artifact from 3 to 4 #35

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Web Release
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
name: Create Web Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "12.x"
cache: gradle
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Get dependencies
run: flutter pub get
- name: Start Web Release Build
run: flutter build web --release
- name: Upload Web Build Files
uses: actions/upload-artifact@v3
with:
name: web-release
path: ./build/web
# Create Android Build
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "12.x"
cache: gradle
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Get dependencies
run: flutter pub get
- name: Upgrade dependencies
run: flutter pub upgrade
# Runs a set of commands using the runners shell
- name: Start release build
run: flutter build apk --no-tree-shake-icons --debug
- name: Create Release
uses: ncipollo/release-action@v1.13.0
with:
artifacts: "./build/app/outputs/flutter-apk/app-debug.apk"
tag: v1.0.${{ github.run_number }}
# - name: Copy Build Files to Deployment Repository
# run: |
# mkdir deployment
# cp -r build/web/* deployment/
# cd deployment
# git init
# # git remote add origin https://github.com/TESLA2402/Portfolio.git
# git remote add origin https://${{ secrets.GITHUB_PAT }}@github.com/TESLA2402/Portfolio.git
# git config --global user.email "lakshay6447@gmail.com"
# git config --global user.name "TESLA2402"
# git checkout -b main # Or the branch where you want to deploy
# git add .
# git commit -m "Deploy latest build"
# git config credential.helper store
# git push -f origin main # Force push to update the deployment repo
# - name: Clean up
# run: |
# cd ..
# rm -rf deployment # Clean up the temporary deployment directory
deploy:
name: Deploy Web Build
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Web Release
uses: actions/download-artifact@v4
with:
name: web-release
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
commit_message: ":rocket: deploy:"