-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (46 loc) · 1.84 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (46 loc) · 1.84 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
name: release
# Cut a release by pushing a tag, e.g.: git tag v0.1.0 && git push origin v0.1.0
on:
push:
tags: ['v*']
permissions:
contents: write # create the GitHub Release + upload assets
packages: write # push the Helm chart to GHCR (OCI)
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: npm
- run: npm ci --no-audit --no-fund
- name: Test (coverage gate)
run: npm test
- name: Build release bundle
run: build/bundle.sh "${GITHUB_REF_NAME#v}"
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--generate-notes \
dist/altinity-sql-browser.tar.gz \
dist/altinity-sql-browser.tar.gz.sha256 \
dist/sql.html
# Package the Helm chart and push it to GHCR as an OCI artifact — same
# approach as altinity-mcp. The container image itself is built+pushed by
# docker.yml (also on the v* tag).
- uses: azure/setup-helm@v4
with:
version: latest
- name: Package + push Helm chart to GHCR
run: |
VERSION="${GITHUB_REF_NAME#v}"
sed -i "s/^version: .*/version: ${VERSION}/" helm/altinity-sql-browser/Chart.yaml
sed -i "s/^appVersion: .*/appVersion: \"${VERSION}\"/" helm/altinity-sql-browser/Chart.yaml
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u "${{ github.actor }}" --password-stdin
helm package helm/altinity-sql-browser --version "${VERSION}" --app-version "${VERSION}"
helm push "altinity-sql-browser-${VERSION}.tgz" oci://ghcr.io/altinity/altinity-sql-browser/helm