-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (81 loc) · 2.69 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: build
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
workflow_dispatch:
inputs:
create_release:
type: boolean
description: "Create GitHub release for current version"
required: false
default: false
jobs:
ubuntu-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubicloud-standard-4-arm]
postgres: [11, 12, 13, 14, 15, 16]
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Build
id: build
run: sudo su -c "PG_VERSION=$PG_VERSION SETUP_POSTGRES=1 PACKAGE_EXTENSION=1 GITHUB_OUTPUT=$GITHUB_OUTPUT ./ci/scripts/build.sh"
env:
PG_VERSION: ${{ matrix.postgres }}
- name: Build Lantern CLI
id: build_cli
run: sudo su -c "PACKAGE_CLI=1 GITHUB_OUTPUT=$GITHUB_OUTPUT ./ci/scripts/build.sh"
if: ${{ matrix.postgres == 15 }} # run only once
- name: Upload archive package artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.archive_package_name }}
path: ${{ steps.build.outputs.archive_package_path }}
- name: Upload Lantern CLI artifacts
if: ${{ matrix.postgres == 15 }} # run only once
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build_cli.outputs.cli_package_name }}
path: ${{ steps.build_cli.outputs.cli_package_path }}
ubuntu-package:
runs-on: ubuntu-22.04
needs: [ubuntu-build]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: lantern-extras-*
merge-multiple: true
path: /tmp/lantern-extras-package
- uses: geekyeggo/delete-artifact@v4
with:
name: lantern-extras-*
- name: Create universal package
id: package
run: sudo su -c "GITHUB_OUTPUT=$GITHUB_OUTPUT ./ci/scripts/package.sh"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.package.outputs.package_name }}
path: ${{ steps.package.outputs.package_path }}
- name: Create GitHub release
uses: softprops/action-gh-release@v1
id: create_release
if: ${{ github.event_name == 'workflow_dispatch' && inputs.create_release }}
with:
name: Lantern Extras ${{ steps.package.outputs.package_version }}
tag_name: ${{ steps.package.outputs.package_version }}
files: |
${{ steps.package.outputs.package_path }}
/tmp/lantern-cli-package/*
generate_release_notes: true