Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Release to latest/edge
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.
name: Release to Charmhub

on:
push:
Expand All @@ -7,11 +9,12 @@ on:

jobs:
ci-tests:
name: Tests
uses: ./.github/workflows/ci.yaml
secrets: inherit

release-to-charmhub:
name: Release to CharmHub
release-libraries:
name: Release libraries
needs:
- ci-tests
runs-on: ubuntu-latest
Expand All @@ -21,17 +24,26 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select charmhub channel
uses: canonical/charming-actions/channel@2.2.5
id: channel
- name: Release any bumped charm libs
- name: Release charm libraries
uses: canonical/charming-actions/release-libraries@2.2.5
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Upload charm to charmhub
uses: canonical/charming-actions/upload-charm@2.2.5
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
channel: "${{ steps.channel.outputs.name }}"

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v2

release:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v2
with:
channel: 14/edge
artifact-name: ${{ needs.build.outputs.artifact-name }}
secrets:
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}
permissions:
contents: write # Needed to create GitHub release