From b6eb5840c88e65083a446e0c46d99e0f1db89309 Mon Sep 17 00:00:00 2001 From: Lena Voytek Date: Wed, 1 Oct 2025 18:37:32 -0400 Subject: [PATCH] Use canonical/observability publish script --- .github/workflows/publish.yml | 78 ++--------------------------------- 1 file changed, 3 insertions(+), 75 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 94a884c..ba8269b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,78 +6,6 @@ on: - main jobs: - pack-charm: - name: Prepare charm for upload - runs-on: ubuntu-24.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup LXD - uses: canonical/setup-lxd@main - - - name: Install charmcraft - run: sudo snap install charmcraft --classic - - - name: Pack charm - run: charmcraft pack -v - - - name: Upload charm artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 - with: - name: charm - path: ./*.charm - - define-matrix: - name: Define charms upload matrix - runs-on: ubuntu-24.04 - needs: - - pack-charm - outputs: - charms: ${{ steps.charms.outputs.charms }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Download charm artifact(s) - uses: actions/download-artifact@v4 - with: - name: charm - - - name: Generate matrix list - id: charms - run: | - list="$(ls *.charm | jq -r -ncR '[input]')" - echo "charms=$list" - echo "charms=$list" >> $GITHUB_OUTPUT - - publish-to-edge: - name: Release to CharmHub - runs-on: ubuntu-24.04 - needs: - - define-matrix - strategy: - matrix: - charm: ${{ fromJSON(needs.define-matrix.outputs.charms) }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Select charmhub channel - id: channel - uses: canonical/charming-actions/channel@2.7.0 - - - name: Download charm artifact(s) - uses: actions/download-artifact@v4 - with: - name: charm - - - name: Upload charm to charmhub - uses: canonical/charming-actions/upload-charm@2.7.0 - with: - credentials: "${{ secrets.CHARMHUB_TOKEN }}" - github-token: "${{ secrets.GITHUB_TOKEN }}" - channel: "${{ steps.channel.outputs.name }}" - built-charm-path: "${{ matrix.charm }}" + release: + uses: canonical/observability/.github/workflows/charm-release.yaml@v1 + secrets: inherit