Skip to content

docs: streamline README #43

docs: streamline README

docs: streamline README #43

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [main]
paths:
- ".github/workflows/**"
- "src/**"
- "tests/**"
- "package.json"
- "bun.lock"
- "tsconfig.json"
- "biome.json"
pull_request:
branches: [main]
paths:
- ".github/workflows/**"
- "src/**"
- "tests/**"
- "package.json"
- "bun.lock"
- "tsconfig.json"
- "biome.json"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
full-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run project checks
run: bun run check:ci
draft-release:
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Generate release notes
id: notes
run: |
NOTES=$(bunx release-tools changelog)
{
echo "notes<<EOF"
echo "$NOTES"
echo "EOF"
} >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create or update draft release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
EXISTING_DRAFT=$(gh release list --json tagName,isDraft --jq '.[] | select(.isDraft == true and .tagName == "next") | .tagName')
if [ -n "$EXISTING_DRAFT" ]; then
echo "Updating existing draft release..."
gh release edit next \
--title "Upcoming Changes 🛡️" \
--notes-file - \
--draft <<'NOTES_EOF'
${{ steps.notes.outputs.notes }}
NOTES_EOF
else
echo "Creating new draft release..."
gh release create next \
--title "Upcoming Changes 🛡️" \
--notes-file - \
--draft \
--target ${{ github.sha }} <<'NOTES_EOF'
${{ steps.notes.outputs.notes }}
NOTES_EOF
fi