From d5e0542620eeae999d29d52f2d96a2af676f5085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Juli=C3=A1n=20Espina?= Date: Fri, 20 Dec 2024 13:00:42 -0600 Subject: [PATCH] ci: add publish action --- .github/workflows/publish.yaml | 36 +++++++++++++++++++ .../filesystem_client/v0/filesystem_info.py | 2 +- .../filesystem_client/v0/filesystem_info.py | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..f3f1636 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,36 @@ +# Copyright 2024 Canonical Ltd. +# See LICENSE for licensing details. + +name: Release to latest/edge + +on: + push: + branches: + - main + +jobs: + ci-tests: + uses: ./.github/workflows/ci.yaml + + release-to-charmhub: + name: Release filesystem-client to Charmhub + needs: + - ci-tests + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Select charmhub channel + uses: canonical/charming-actions/channel@2.6.3 + id: channel + - name: Release updated libraries to Charmhub + uses: canonical/charming-actions/release-libraries@2.6.3 + with: + credentials: "${{ secrets.CHARMCRAFT_AUTH }}" + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Upload charm to Charmhub + uses: canonical/charming-actions/upload-charm@2.6.3 + with: + credentials: "${{ secrets.CHARMCRAFT_AUTH }}" + github-token: "${{ secrets.GITHUB_TOKEN }}" + channel: "${{ steps.channel.outputs.name }}" diff --git a/lib/charms/filesystem_client/v0/filesystem_info.py b/lib/charms/filesystem_client/v0/filesystem_info.py index dbce045..22a33c4 100644 --- a/lib/charms/filesystem_client/v0/filesystem_info.py +++ b/lib/charms/filesystem_client/v0/filesystem_info.py @@ -131,7 +131,7 @@ def _on_start(self, event: ops.StartEvent) -> None: ] # The unique Charmhub library identifier, never change it -LIBID = "todo" +LIBID = "7e11f60a31a441aaa70ada2f41c75580" # Increment this major API version when introducing breaking changes LIBAPI = 0 diff --git a/tests/integration/server/lib/charms/filesystem_client/v0/filesystem_info.py b/tests/integration/server/lib/charms/filesystem_client/v0/filesystem_info.py index dbce045..22a33c4 100644 --- a/tests/integration/server/lib/charms/filesystem_client/v0/filesystem_info.py +++ b/tests/integration/server/lib/charms/filesystem_client/v0/filesystem_info.py @@ -131,7 +131,7 @@ def _on_start(self, event: ops.StartEvent) -> None: ] # The unique Charmhub library identifier, never change it -LIBID = "todo" +LIBID = "7e11f60a31a441aaa70ada2f41c75580" # Increment this major API version when introducing breaking changes LIBAPI = 0