build scripts & issue templates

This commit is contained in:
nyne
2024-10-27 20:16:04 +08:00
parent 8b95442dad
commit 3cea340f97
14 changed files with 437 additions and 2 deletions

48
.github/ISSUE_TEMPLATE/bug.yaml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Report a bug
description: Reporting problems with the APP
title: "[Bug]: "
labels: ["bug🐞"]
body:
- type: markdown
attributes:
value: |
Thank you for reporting a problem, please complete the title and fill in the following information.
- type: textarea
id: what-happened
attributes:
label: Description
description: Describe the problem
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: |
App version
Please try to update if it is not the latest version
validations:
required: true
- type: dropdown
id: platform
attributes:
label: Operating system
multiple: true
options:
- Android
- iOS
- Windows
- macOS
- linux
- other
validations:
required: true
- type: textarea
id: logs
attributes:
label: logs
- type: textarea
id: screenshotOrVideo
attributes:
label: Screenshot or video
description: Upload relevant screenshots or videos here

36
.github/ISSUE_TEMPLATE/enhancement.yaml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Feature Request
description: Suggest improvements to the APP
title: "[Enhancement]: "
labels: ["enhancement🚀"]
body:
- type: markdown
attributes:
value: |
Welcome to make a feature request, please fill in the following information after completing the title.
- type: textarea
id: what-happened
attributes:
label: Description
description: Describe your suggestion.
validations:
required: true
- type: dropdown
id: platform
attributes:
label: Operating System
description: If the feature is for a particular platform, please select here
multiple: true
options:
- Android
- iOS
- Windows
- macOS
- linux
- other
validations:
required: false
- type: textarea
id: screenshotOrVideo
attributes:
label: picture
description: If you need to use a picture, please upload it here.

9
.github/ISSUE_TEMPLATE/other.yaml vendored Normal file
View File

@@ -0,0 +1,9 @@
name: other
description: Other contents
body:
- type: textarea
id: what-happened
attributes:
label: Content
validations:
required: true

View File

@@ -0,0 +1,66 @@
name: Delete old workflow runs
on:
workflow_dispatch:
inputs:
days:
description: 'Days-worth of runs to keep for each workflow'
required: true
default: '30'
minimum_runs:
description: 'Minimum runs to keep for each workflow'
required: true
default: '6'
delete_workflow_pattern:
description: 'Name or filename of the workflow (if not set, all workflows are targeted)'
required: false
delete_workflow_by_state_pattern:
description: 'Filter workflows by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually'
required: true
default: "ALL"
type: choice
options:
- "ALL"
- active
- deleted
- disabled_inactivity
- disabled_manually
delete_run_by_conclusion_pattern:
description: 'Remove runs based on conclusion: action_required, cancelled, failure, skipped, success'
required: true
default: "ALL"
type: choice
options:
- "ALL"
- "Unsuccessful: action_required,cancelled,failure,skipped"
- action_required
- cancelled
- failure
- skipped
- success
dry_run:
description: 'Logs simulated changes, no deletions are performed'
required: false
jobs:
del_runs:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: ${{ github.event.inputs.days }}
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
delete_run_by_conclusion_pattern: >-
${{
startsWith(github.event.inputs.delete_run_by_conclusion_pattern, 'Unsuccessful:')
&& 'action_required,cancelled,failure,skipped'
|| github.event.inputs.delete_run_by_conclusion_pattern
}}
dry_run: ${{ github.event.inputs.dry_run }}

33
.github/workflows/linux.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Build Linux
run-name: Build Linux
on:
workflow_dispatch: {}
jobs:
Build_Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version-file: pubspec.yaml
architecture: x64
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev webkit2gtk-4.1
dart pub global activate flutter_to_debian
- run: python3 debian/build.py
- run: dart run flutter_to_arch
- run: |
sudo rm -rf build/linux/arch/app.tar.gz
sudo rm -rf build/linux/arch/pkg
sudo rm -rf build/linux/arch/src
sudo rm -rf build/linux/arch/PKGBUILD
- uses: actions/upload-artifact@v4
with:
name: deb_build
path: build/linux/x64/release/debian
- uses: actions/upload-artifact@v4
with:
name: arch_build
path: build/linux/arch/

43
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Build IOS
run-name: Build IOS
on:
workflow_dispatch: {}
jobs:
Build_IOS:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version-file: pubspec.yaml
architecture: x64
- run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app
- run: flutter pub get
- run: flutter build ios --release --no-codesign
- run: |
mkdir -p /Users/runner/work/venera/venera/build/ios/iphoneos/Payload
mv /Users/runner/work/venera/venera/build/ios/iphoneos/Runner.app /Users/runner/work/venera/venera/build/ios/iphoneos/Payload
cd /Users/runner/work/venera/venera/build/ios/iphoneos/
zip -r venera-ios.ipa Payload
- uses: actions/upload-artifact@v4
with:
name: app-ios.ipa
path: /Users/runner/work/venera/venera/build/ios/iphoneos/venera-ios.ipa
Build_MacOS:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version-file: pubspec.yaml
architecture: x64
- run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app
- run: flutter pub get
- run: flutter build macos --release
- uses: actions/upload-artifact@v4
with:
name: macos-build.zip
path: build/macos/Build/Products/Release/venera.app