Files
superset2/.github/workflows/release.yml
Evan Rusackas aa94a8eebd feat(docker/ci): migrate Docker and CI from npm to bun
Docker changes:
- Use oven/bun:1-debian as base image instead of node:20-trixie-slim
- Replace npm ci with bun install --frozen-lockfile
- Replace npm run commands with bun run
- Mount bun.lock instead of package-lock.json
- Update cache paths for Bun's cache directory
- Rename NPM_RUN_PRUNE env var to BUN_RUN_PRUNE

CI workflow changes:
- Update bashlib.sh npm-install function to use bun
- Update superset-frontend.yml to use bun run commands
- Update release.yml to use setup-bun action and changesets
- Update superset-e2e.yml to use setup-bun action
- Update superset-playwright.yml to use setup-bun action
- Update superset-translations.yml to use setup-bun action

Note: superset-embedded-sdk and superset-websocket remain on npm
as they are separate packages with their own lockfiles.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 11:46:21 -08:00

94 lines
2.9 KiB
YAML

name: release-workflow
on:
push:
branches:
- "master"
- "[0-9].[0-9]*"
jobs:
config:
runs-on: ubuntu-24.04
outputs:
has-secrets: ${{ steps.check.outputs.has-secrets }}
steps:
- name: "Check for secrets"
id: check
shell: bash
run: |
if [ -n "${{ (secrets.NPM_TOKEN != '' && secrets.GH_PERSONAL_ACCESS_TOKEN != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
fi
build:
needs: config
if: needs.config.outputs.has-secrets
name: Bump version and publish package(s)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: 0
- name: Get tags and filter trigger tags
run: |
if ! git fetch --depth=1 origin "+refs/tags/*:refs/tags/*"; then
echo "::notice title=Workflow skipped::No tags present in repository"
exit
fi
echo "HAS_TAGS=1" >> $GITHUB_ENV"
git fetch --prune --unshallow
git tag -d `git tag | grep -E '^trigger-'`
- name: Install Bun
if: env.HAS_TAGS
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Cache bun
if: env.HAS_TAGS
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
if: env.HAS_TAGS
working-directory: ./superset-frontend
run: bun install --frozen-lockfile
- name: Run unit tests
if: env.HAS_TAGS
working-directory: ./superset-frontend
run: bun run test -- plugins packages
- name: Build packages
if: env.HAS_TAGS
working-directory: ./superset-frontend
run: bun run turbo:build
- name: Configure npm and git
if: env.HAS_TAGS
run: |
echo "@superset-ui:registry=https://registry.npmjs.org/" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
npm whoami
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
- name: Publish packages with changesets
if: env.HAS_TAGS
working-directory: ./superset-frontend
run: |
git tag -d `git tag | grep -E '^trigger-'`
bun run changeset:publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}