Skip to content

Commit bf86d8d

Browse files
committed
ci: Create Linux installer
Adds a workflow to create a Linux deb installer and tar archive for releases.
1 parent 2e56768 commit bf86d8d

File tree

3 files changed

+409
-0
lines changed

3 files changed

+409
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: celest_cli (Release)
2+
on:
3+
workflow_dispatch:
4+
pull_request: # Remove
5+
6+
env:
7+
CELEST_NO_ANALYTICS: true
8+
9+
# Prevent duplicate runs due to Graphite
10+
# https://graphite.dev/docs/troubleshooting#why-are-my-actions-running-twice
11+
concurrency:
12+
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || ''}}
13+
cancel-in-progress: true
14+
15+
# Needed for GCP actions
16+
permissions:
17+
contents: read
18+
id-token: write
19+
20+
jobs:
21+
bundle:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 10
24+
steps:
25+
- name: Git Checkout
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
27+
28+
- name: Setup Flutter
29+
uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 # 2.19.0
30+
with:
31+
cache: true
32+
channel: beta # Needed for cross-compilation
33+
34+
- name: Fix pub cache
35+
run: |
36+
dart pub get
37+
dart run fix_pub_cache.dart
38+
working-directory: tool
39+
40+
- name: Get Packages
41+
run: dart pub get
42+
working-directory: apps/cli
43+
44+
- name: Create Bundle (x64)
45+
id: bundle-x64
46+
run: dart run tool/release.dart --target-os=linux --target-arch=x64
47+
working-directory: apps/cli
48+
49+
# # Test the new CLI before releasing
50+
# - name: Install Bundle
51+
# uses: celest-dev/setup-celest@main
52+
# with:
53+
# installer: ${{ steps.bundle.outputs.installer }}
54+
# env:
55+
# CELEST_VERBOSE: true
56+
# - name: Test
57+
# working-directory: apps/cli
58+
# run: dart test -t e2e-installed --fail-fast
59+
60+
- name: Upload Bundle (x64)
61+
id: upload-bundle-x64
62+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
63+
with:
64+
name: ${{ steps.bundle-x64.outputs.name }}
65+
path: ${{ steps.bundle-x64.outputs.installer }}
66+
67+
- name: Upload Bundle (x64 - Latest)
68+
id: upload-bundle-x64-latest
69+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
70+
with:
71+
name: ${{ steps.bundle-x64.outputs.latest-name }}
72+
path: ${{ steps.bundle-x64.outputs.installer }}
73+
overwrite: true
74+
75+
- name: Create Bundle (arm64)
76+
id: bundle-arm64
77+
run: dart run tool/release.dart --target-os=linux --target-arch=arm64
78+
working-directory: apps/cli
79+
80+
- name: Upload Bundle (arm64)
81+
id: upload-bundle-arm64
82+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
83+
with:
84+
name: ${{ steps.bundle-arm64.outputs.name }}
85+
path: ${{ steps.bundle-arm64.outputs.installer }}
86+
87+
- name: Upload Bundle (arm64 - Latest)
88+
id: upload-bundle-arm64-latest
89+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
90+
with:
91+
name: ${{ steps.bundle-arm64.outputs.latest-name }}
92+
path: ${{ steps.bundle-arm64.outputs.installer }}
93+
overwrite: true
94+
95+
- name: Print Artifacts
96+
run: |
97+
echo "${{ steps.bundle-x64.outputs.name }}: ${{ steps.upload-bundle-x64.outputs.artifact-id }}"
98+
echo "${{ steps.bundle-x64.outputs.latest-name }}: ${{ steps.upload-bundle-x64-latest.outputs.artifact-id }}"
99+
echo "${{ steps.bundle-arm64.outputs.name }}: ${{ steps.upload-bundle-arm64.outputs.artifact-id }}"
100+
echo "${{ steps.bundle-arm64.outputs.latest-name }}: ${{ steps.upload-bundle-arm64-latest.outputs.artifact-id }}"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Package: Celest
2+
Depends: gnome-keyring, libsecret-1-0, libsqlite3-dev
3+
Version: {{ version }}
4+
Maintainer: Celest
5+
Architecture: {{ arch }}
6+
Description: The CLI for Celest, the Flutter cloud platform

0 commit comments

Comments
 (0)