Skip to content

Add reusable Roc release workflow#1

Merged
lukewilliamboswell merged 7 commits into
mainfrom
implement-release-workflow
Jul 10, 2026
Merged

Add reusable Roc release workflow#1
lukewilliamboswell merged 7 commits into
mainfrom
implement-release-workflow

Conversation

@lukewilliamboswell

Copy link
Copy Markdown
Contributor

Summary

  • add reusable Roc release workflow for bundle build/test/publish/docs
  • add Python helper tooling for version, bundle, docs, and release-note validation
  • add CI, unit tests, README usage docs, and UPL license

Tests

  • python3 -m unittest discover -s tests
  • bash -n scripts/release/run-command.sh
  • actionlint v1.7.12

lukewilliamboswell and others added 5 commits July 8, 2026 10:35
Correctness:
- run-command.sh: hard-fail on empty commands, trim trailing whitespace
  and reject trailing '#' comments in --append-args commands, fix mktemp
  template for BSD/macOS (trailing X's)
- run-bump-check: 'require' mode fails when no previous release URL was
  resolved instead of silently skipping
- 404 handling: parse gh's JSON status field and verify repo access
  before treating a 404 as "does not exist" (resolve-previous-url and
  check-availability)
- validate-release: availability check runs for real versions even in
  dry-run mode; all skips print a notice; GITHUB_ENV writes go through
  the hardened writer
- prepare-bundles: marker-guarded rmtree so a custom bundle_dir cannot
  delete pipeline metadata; glob.escape the workspace prefix; validate
  artifact filenames early (suffix, '#', separators)
- Version and output-name validation use re.fullmatch (trailing
  newlines rejected)
- docs-index only emits index_file when the file was written
- make-release-notes: fence-safe bump output embedding, repo/target
  validation, absolute paths and parent dir for custom commands
- test-bundle exports an absolute BUNDLE_PATH

Cleanup:
- New validate-release subcommand moves version fallback, semver
  splitting, boolean validation, and output emission from bash into
  release.py; actions shrink to thin wrappers
- Env fallbacks and true/false choices handled once in argparse
- Shared BUNDLE_SUFFIX and bump-skip sentinel constants
- Remove dead compact-json/validate-version subcommands, hand-rolled
  path_is_relative_to, unreachable branch, unused echo-back outputs
- Tests build args via the real parser and share a fake-command helper

CI/docs:
- Shellcheck composite action run: blocks via scripts/lint_action_shell.py
- Drop duplicate action-metadata test step
- README: event-scoped concurrency groups, generate-notes needs
  contents: write, drop fetch-depth: 0, docs_url documented with the
  docs job, first-release guidance for bump_check: require

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lukewilliamboswell

Copy link
Copy Markdown
Contributor Author

I've tested this end to end on https://github.com/lukewilliamboswell/roc-ansi and everything is working well.

I'll merge this now, and continue upgrading packages and platforms. Any future fixes can roll into follow-up PR's.

@lukewilliamboswell
lukewilliamboswell merged commit f69d84f into main Jul 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant