Skip to content

build: update version #1

build: update version

build: update version #1

Workflow file for this run

name: Web Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
- name: 🐦 Setup Flutter SDK v3.10.x
uses: subosito/flutter-action@v2
with:
flutter-version: 3.10.x
channel: stable
cache: true
cache-key: |
flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: 📦 Get dependencies
run: flutter pub get
- name: ⚙️ Setup environment
run: |
echo "${{secrets.PROD_ENV_FILE}}" > .env
dart run build_runner build -d
- name: ⚙️ Setup web build
working-directory: web
run: |
cp ../configs/github-pages/404.html 404.html
- name: 🏗️ Build web release
run: |
flutter build web --release --base-href "/screen_pal/" --web-renderer canvaskit
- name: 📝 Upload build
uses: actions/upload-artifact@v2
with:
name: build-web
path: ./build/web
deploy:
needs: build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: 📝 Download build
uses: actions/download-artifact@v2
with:
name: build-web
path: ./build
- name: ⚙️ Setup tag name
id: setup_tag
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "TAG_NAME=deploy-{TAG_NAME}" >> "${GITHUB_OUTPUT}"
- name: 📚 Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
tag_name: ${{ steps.setup_tag.outputs.TAG_NAME }}