Release Charts #3
This file contains hidden or 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 Charts | |
| env: | |
| HELM_VERSION: v3.13.0 | |
| CHART_NAME: lagrange-onebot | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'chart/**' | |
| workflow_dispatch: | |
| jobs: | |
| package-and-publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| 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: Set up Helm | |
| uses: azure/setup-helm@v3 | |
| with: | |
| version: ${{ env.HELM_VERSION }} | |
| - name: Update chart dependencies | |
| run: | | |
| cd ${{ env.CHART_NAME }} | |
| helm dependency update | |
| - name: Package chart | |
| run: | | |
| helm package chart --destination charts/ | |
| - name: Generate Helm repo index | |
| run: | | |
| cd gh-pages | |
| helm repo index . --url https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: charts | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |