generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 5
70 lines (65 loc) · 1.91 KB
/
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
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.
name: Release to Charmhub
on:
push:
branches:
- main
paths-ignore:
- 'tests/**'
- 'docs/**'
- .github/renovate.json5
- pyproject.toml
- '.github/workflows/ci.yaml'
- '.github/workflows/lib-check.yaml'
- '.github/workflows/sync_docs.yaml'
jobs:
ci-tests:
name: Tests
uses: ./.github/workflows/ci.yaml
secrets: inherit
permissions:
contents: write # Needed for Allure Report beta
release-libraries:
name: Release libraries
needs:
- ci-tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up environment
run: |
pipx install tox
pipx install poetry
pipx inject poetry poetry-plugin-export
# TODO: Remove after https://github.com/python-poetry/poetry/pull/5980 is closed
poetry config warnings.export false
- name: Generate requirements
run: |
tox run -e build-wrapper
mv requirements-last-build.txt requirements.txt
- name: Release charm libraries
uses: canonical/charming-actions/[email protected]
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
release:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
channel: 1/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
secrets:
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}
permissions:
contents: write # Needed to create GitHub release