-
Notifications
You must be signed in to change notification settings - Fork 7
74 lines (69 loc) · 2.16 KB
/
charm-release.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
name: Release to v2/edge
on:
workflow_dispatch:
push:
tags:
- 'v2*'
# Note this workflow requires a Github secret to provide auth against charmhub.
# This can be generated with the following command
# charmcraft login --export=secrets.auth --charm=<charm-name> --permission=package-manage --permission=package-view --channel=latest/edge --ttl=999999999
jobs:
ci-tests:
uses: ./.github/workflows/ci.yaml
charm-tests:
uses: ./.github/workflows/charm-test.yaml
snap-build:
uses: ./.github/workflows/snap.yaml
release-k8s-charm:
name: Release k8s charm
needs:
- ci-tests
- charm-tests
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build local images
run: make jimm-image
- name: Upload charm to charmhub
uses: kian99/charming-actions/upload-charm@add-local-image-option
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
channel: "2/edge"
charm-path: "./charms/jimm-k8s"
local-image: "true"
tag-prefix: "v2-k8s"
release-machine-charm:
name: Release machine charm
needs:
- ci-tests
- charm-tests
- snap-build
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@master
with:
name: jimm-snap
- name: Install charmcraft
run: sudo snap install charmcraft --channel=2.x/stable --classic
- name: Publish Charm Resource
run: charmcraft upload-resource juju-jimm jimm-snap --filepath ./jimm.snap
env:
CHARMCRAFT_AUTH: "${{ secrets.CHARMHUB_TOKEN }}"
- name: Upload charm to charmhub
uses: canonical/charming-actions/[email protected]
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
channel: "2/edge"
charm-path: "./charms/jimm"
tag-prefix: "v2-machine"