Files
superset2/.github/workflows/release.yml
Evan Rusackas 85764701f5 docs(ci): complete bun/turborepo/changesets migration docs and workflows
- Update all CI workflows (pre-commit, tech-debt) to use Bun
- Update build scripts (js_build.sh, cypress_build.sh, eslint.sh) for Bun
- Add sync-package-versions.js script for release version alignment
- Simplify package.json scripts (build:packages, publish:packages)
- Add gitTag: false to changesets config to avoid repo tag clutter
- Remove obsolete Lerna scripts (build.js, lernaVersion.sh)
- Update RELEASING/README.md with comprehensive npm publishing guide
- Update all developer documentation for Bun usage
- Update LLM instruction files (AGENTS.md, dev-standard.mdc)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 23:20:33 -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 changesets 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 build:packages
- 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 }}