chore: release v0.7.3 #20
Workflow file for this run
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 | |
| # Cut a release by pushing a semver 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@v7 | |
| 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 vX.Y.Z tag). | |
| - uses: azure/setup-helm@v5 | |
| 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 | |
| # Mirror the just-built sql.html onto docs.altinity.com/altinity-sql-browser/ | |
| # (GitHub Pages is configured to serve this repo's /docs on main). dist/ is | |
| # gitignored, so it survives the branch switch below. Run last so nothing | |
| # else in this job depends on which ref ends up checked out. | |
| - name: Publish sql.html to GitHub Pages docs/ | |
| run: | | |
| git fetch --depth=1 origin main | |
| git checkout -B main origin/main | |
| cp dist/sql.html docs/sql.html | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add docs/sql.html | |
| if git diff --cached --quiet; then | |
| echo "docs/sql.html unchanged, skipping commit" | |
| else | |
| git commit -m "docs: publish sql.html ${GITHUB_REF_NAME} to GitHub Pages" | |
| git push origin main | |
| fi |