Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify GitHub action to run only on releases #453

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions release-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release Artifacts

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64

- name: Get Flutter dependencies
run: flutter pub get

- name: Analyze Flutter code
run: flutter analyze

- name: Run Flutter tests
run: flutter test

- name: Build Android APK
run: flutter build apk

- name: Upload Android APK
uses: actions/upload-artifact@v2
with:
name: app-release-apk
path: build/app/outputs/flutter-apk/app-release.apk

- name: Build macOS application
run: flutter build macos

- name: Upload macOS application
uses: actions/upload-artifact@v2
with:
name: macos-release-app
path: build/macos/Build/Products/Release/*.app

- name: Build Linux application
run: flutter build linux

- name: Upload Linux application
uses: actions/upload-artifact@v2
with:
name: linux-release-app
path: build/linux/x64/release/bundle/*

- name: Build Windows application
run: flutter build windows

- name: Upload Windows application
uses: actions/upload-artifact@v2
with:
name: windows-release-app
path: build/windows/x64/runner/Release/*.exe
Loading