Merge pull request #31 from EduIDE/quickfix/linting-errors #30
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'chart/**' | |
| - '.github/workflows/release.yml' | |
| jobs: | |
| release: | |
| permissions: | |
| contents: write | |
| packages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4 | |
| - name: Update chart dependencies | |
| run: helm dependency update ./chart | |
| - name: Set registry owner | |
| run: echo "REGISTRY_OWNER=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
| - name: Login to GHCR | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Extract chart version | |
| id: chart | |
| run: | | |
| VERSION=$(grep '^version:' chart/Chart.yaml | awk '{print $2}') | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Package and push to OCI | |
| run: | | |
| helm package ./chart | |
| helm push theia-shared-cache-${{ steps.chart.outputs.version }}.tgz oci://ghcr.io/${{ env.REGISTRY_OWNER }}/charts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: theia-shared-cache-${{ steps.chart.outputs.version }} | |
| name: theia-shared-cache ${{ steps.chart.outputs.version }} | |
| generate_release_notes: true |