diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 49d9487578..72752a4037 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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: @@ -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 @@ -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