-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (60 loc) · 1.66 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
name: Build & release wheels
on:
push:
branches:
- main
schedule:
- cron: '53 21 * * *' # Daily at 21:53 UTC
workflow_dispatch:
jobs:
collect-charms:
name: Collect charms
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install CLI
run: pipx install ./cli/
- name: Collect charms to build from charms.json
id: collect
run: collect-charms
outputs:
charms: ${{ steps.collect.outputs.charms }}
build:
strategy:
matrix:
charm: ${{ fromJSON(needs.collect-charms.outputs.charms) }}
name: ${{ matrix.charm.job_name }}
needs:
- collect-charms
uses: ./.github/workflows/build_charm.yaml
with:
github_repository: ${{ matrix.charm.github_repository }}
ref: ${{ matrix.charm.ref }}
relative_path_to_charmcraft_yaml: ${{ matrix.charm.relative_path_to_charmcraft_yaml }}
charm_index: ${{ matrix.charm.charm_index }}
release:
name: Release wheels
needs:
- build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install CLI
run: pipx install ./cli/
- name: Create directory
run: mkdir -p ~/charmcraftcache-hub-ci/platforms/
- name: Download wheels
uses: actions/download-artifact@v4
with:
path: ~/charmcraftcache-hub-ci/platforms/
pattern: charm-*
- name: Create GitHub release
run: release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write # Needed to create release