# This workflow is used when a commit is pushed to the feature branch.
# It follows the following steps:
# - Push to feature branch → push.yml → semantic-release.yml (is-dev-release: true) → creates tag → calls docker-build.yml.
name: Push
on:
push:
# Since the branches must be always up to date, we do not need to run below workflows.
branches-ignore:
- 'main' # Exclude default branch
- 'v*' # Exclude tags
workflow_dispatch:
# Cancel previous runs if a new one is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write # Only need to read code for lint/test/build, but required for semantic-release
env:
BUN_VERSION: '1.3.8'
jobs:
lint-and-test:
name: Lint & Test
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout source code
uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run typecheck
run: bun run typecheck
- name: Run lint
run: bun run lint
- name: Run format
run: bun run format
- name: Run test
run: bun test
- name: Run build
run: bun run build
semantic-release:
name: Semantic Release - Dev
needs: lint-and-test
# Only run semantic-release for branches configured in release.config.dev.mjs
if: |
!contains(github.event.head_commit.message, 'skip ci') && (
startsWith(github.event.head_commit.message, 'feat') ||
startsWith(github.event.head_commit.message, 'fix') ||
startsWith(github.event.head_commit.message, 'refactor') ||
startsWith(github.event.head_commit.message, 'perf') ||
startsWith(github.event.head_commit.message, 'revert') ||
startsWith(github.event.head_commit.message, 'bump') ||
startsWith(github.event.head_commit.message, 'localize')
)
uses: ./.github/workflows/semantic-release.yml
with:
is-dev-release: true
skip-checks: true
secrets: inherit