-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (87 loc) · 3.06 KB
/
ci.yml
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
82
83
84
85
86
87
88
89
90
91
92
name: CI
on:
push:
branches:
- main
- 'build/**'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
check:
name: Check packages
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Brioche
run: |
mkdir -p ~/.local/bin
curl -L https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/x86_64-linux/brioche -o ~/.local/bin/brioche
chmod +x ~/.local/bin/brioche
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Check projects
run: |
for project in packages/*; do
echo "::group::$project"
brioche check -p "$project" --locked
brioche fmt -p "$project" --check
echo "::endgroup::"
done
build:
name: Build packages
needs: [check]
if: github.repository == 'brioche-dev/brioche-packages' && github.event_name == 'push' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/build/') )
runs-on: proxmox-runner-set
steps:
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install -y curl
- name: Checkout code
uses: actions/checkout@v4
- name: Install Brioche
run: |
mkdir -p ~/.local/bin
curl -L https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/x86_64-linux/brioche -o ~/.local/bin/brioche
chmod +x ~/.local/bin/brioche
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build projects
run: |
for project in packages/*; do
echo "::group::$project"
brioche build -p "$project" --check --sync --locked --display plain-reduced
echo "::endgroup::"
done
env:
BRIOCHE_REGISTRY_PASSWORD: ${{ secrets.BRIOCHE_REGISTRY_PASSWORD }}
- name: Save failed processes
if: failure()
uses: actions/upload-artifact@v4
with:
name: process-events
path: ~/.local/share/brioche/process-temp/*/events.bin.zst
compression-level: 0
publish:
name: Publish packages
needs: [build]
if: github.repository == 'brioche-dev/brioche-packages' && github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Brioche
run: |
mkdir -p ~/.local/bin
curl -L https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/x86_64-linux/brioche -o ~/.local/bin/brioche
chmod +x ~/.local/bin/brioche
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Publish projects
run: |
for project in packages/*; do
echo "::group::$project"
brioche publish -p "$project"
echo "::endgroup::"
done
env:
BRIOCHE_REGISTRY_PASSWORD: ${{ secrets.BRIOCHE_REGISTRY_PASSWORD }}