DPE-5627 Arch support and CC006 compliance (#85) #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to Charmhub | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
integration-test: | |
uses: ./.github/workflows/ci.yaml | |
publish-bundle: | |
name: Publish bundle | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
needs: | |
- integration-test | |
env: | |
CHARMCRAFT_AUTH: ${{ secrets.CHARMHUB_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: sudo snap install charmcraft --classic | |
- name: Pack and publish bundle | |
run: | | |
set -ex | |
# Use a temporary directory to support publishing any of the bundles in this root dir | |
BUILD_DIR=.bundle_build | |
mkdir $BUILD_DIR | |
cp ./releases/latest/mysql-k8s-bundle.yaml $BUILD_DIR/bundle.yaml | |
cp charmcraft.yaml $BUILD_DIR | |
cp README.md $BUILD_DIR | |
cd $BUILD_DIR | |
charmcraft pack --destructive-mode | |
charmcraft upload ./*.zip | |
REVISION=$(charmcraft revisions mysql-k8s-bundle 2>&1 | awk 'NR==2 {print $1}') | |
charmcraft release mysql-k8s-bundle --revision "$REVISION" --channel=8.0/edge | |