Skip to content

fix: skip records larger than maxLineSize instead of wedging the subs… #63

fix: skip records larger than maxLineSize instead of wedging the subs…

fix: skip records larger than maxLineSize instead of wedging the subs… #63

Workflow file for this run

name: Release
# ──────────────────────────────────────────────────────────────────────────────
# Trigger: every push to main.
#
# semantic-release analyses Conventional Commits, bumps the version,
# creates a git tag, publishes a GitHub Release, and commits CHANGELOG.md.
# If no releasable commits are present it exits 0.
# ──────────────────────────────────────────────────────────────────────────────
on:
push:
branches: ["main"]
release:
types: [ published ]
workflow_dispatch:
permissions:
contents: write # push tag + release, commit CHANGELOG
issues: write # semantic-release GitHub plugin
pull-requests: write
jobs:
test:
name: Test
# Skip on non-GitHub forges (e.g. Forgejo mirrors this file via
# .github/workflows/ compatibility). semantic-release is GitHub-specific.
if: github.server_url == 'https://github.com'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
- name: Run tests
run: go test -race ./...
- name: Run integration tests
run: go test -race -tags integration -timeout 5m ./...
# ────────────────────────────────────────────────────────────────────────────
# Job – semantic-release (only runs if tests pass)
# ────────────────────────────────────────────────────────────────────────────
semantic-release:
name: Semantic Release
if: github.server_url == 'https://github.com'
runs-on: ubuntu-latest
needs: test
outputs:
# "true" when a new release was actually published this run.
released: ${{ steps.release.outputs.new_release_published }}
version: ${{ steps.release.outputs.new_release_version }}
steps:
- name: Checkout (full history required by semantic-release)
uses: actions/checkout@v4
with:
fetch-depth: 0
# Use a PAT so the CHANGELOG commit can trigger downstream workflows.
# Falls back to GITHUB_TOKEN if the secret is not set.
token: ${{ secrets.RELEASE_TOKEN || secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install semantic-release and plugins
run: |
npm install --no-save \
semantic-release \
@semantic-release/changelog \
@semantic-release/commit-analyzer \
@semantic-release/git \
@semantic-release/github \
@semantic-release/release-notes-generator \
conventional-changelog-conventionalcommits
- name: Run semantic-release
id: release
env:
# Prefer a personal access token so the created Release triggers workflows.
# If RELEASE_TOKEN is not set, fallback to GITHUB_TOKEN (less reliable).
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN || secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
run: npx semantic-release