diff --git a/.github/actions/chart-releaser-action b/.github/actions/chart-releaser-action new file mode 160000 index 00000000..6eec3608 --- /dev/null +++ b/.github/actions/chart-releaser-action @@ -0,0 +1 @@ +Subproject commit 6eec360873ca10c8e462c87ad50c38d1a4332638 diff --git a/.github/actions/setup-helm b/.github/actions/setup-helm new file mode 160000 index 00000000..feeafa61 --- /dev/null +++ b/.github/actions/setup-helm @@ -0,0 +1 @@ +Subproject commit feeafa615201d17b5efbb26af053541ebb8c3677 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..792d425f --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,37 @@ +name: Release Charts + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: ./.github/actions/setup-helm + with: + version: v3.4.0 + + - name: Add Helm repo + run: | + helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo add apisix https://charts.apiseven.com + + - name: Run chart-releaser + uses: ./.github/actions/chart-releaser-action + with: + charts_dir: . + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.gitmodules b/.gitmodules index 320e7303..07d6be61 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,9 @@ path = .github/actions/setup-kind url = https://github.com/engineerd/setup-kind.git branch = v0.5.0 +[submodule ".github/actions/setup-helm"] + path = .github/actions/setup-helm + url = https://github.com/Azure/setup-helm.git +[submodule ".github/actions/chart-releaser-action"] + path = .github/actions/chart-releaser-action + url = https://github.com/helm/chart-releaser-action.git