-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.44 KB
/
release.yml
File metadata and controls
51 lines (42 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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