Skip to content

chore: 🔖 updated version to 1.1.0 #4

chore: 🔖 updated version to 1.1.0

chore: 🔖 updated version to 1.1.0 #4

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: Build and release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Create env file'
run: |
touch .env
echo WEATHER_API_KEY=DUMMY >> .env
- name: Cache Flutter dependencies
uses: actions/cache@v4
with:
path: |
/home/runner/.pub-cache
build/
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-flutter-
- name: Cache Flutter SDK
uses: actions/cache@v4
with:
path: /opt/hostedtoolcache/flutter
key: ${{ runner.os }}-flutter-sdk-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-flutter-sdk-
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
- name: Build debug APK
run: flutter build apk --debug
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: app-debug
path: build/app/outputs/flutter-apk/app-debug.apk
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: app-debug
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release APK
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: app-debug.apk
asset_path: app-debug.apk
asset_content_type: application/vnd.android.package-archive