chore(ci): rewrite CI/CD pipeline to support additional platforms

This commit is contained in:
Jagandeep Brar
2022-04-01 17:07:19 -04:00
parent 3cc431b210
commit 00c9dffeb3
23 changed files with 946 additions and 794 deletions

70
.github/workflows/build_linux.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
name: '[Release] Linux'
on:
workflow_call:
inputs:
build_number:
required: true
type: string
secrets:
FIREBASE_OPTIONS:
required: true
jobs:
build_snap:
name: Snap
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download Source Files
uses: actions/download-artifact@v3
with:
name: lib
path: ${{ github.workspace }}/lib
- name: Download Localization Files
uses: actions/download-artifact@v3
with:
name: localization
path: ${{ github.workspace }}/assets/localization
- name: Install Secrets
working-directory: ${{ github.workspace }}
run: |
echo ${{ secrets.FIREBASE_OPTIONS }} | base64 --decode > lib/firebase_options.dart
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: ${{ github.sha }}
- name: Setup Flutter
working-directory: ${{ github.workspace }}
run: |
flutter pub get
- name: Build LunaSea
uses: snapcore/action-build@v1
id: build
- name: Prepare Folder
run: |
mkdir -p ${{ github.workspace }}/output
- name: Move Snap
working-directory: ${{ github.workspace }}
run: |
mv ${{ steps.build.outputs.snap }} ${{ github.workspace }}/output/LunaSea-Linux-amd64.snap
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: linux-snap
path: ${{ github.workspace }}/output