Like semantic-release, but opinionated, fast, and built with Deno in mind.
(forked from
justinawrey/shipit)
It's not, really. It's a different implementation of the same idea. However, some tweaks have been made to optimize for Deno:
-
Releases start at
0.1.0. This is a common convention for Node projects, but seems to be even more common for Deno projects. -
No support for publishing to npm. Since deno.land/x syncs your code when you publish a GitHub release, publishing is all you need.
-
Documentation changes cause a minor version bump. Documentation is a feature, especially since JSR and deno doc will scrape your code. This decision is less of a Deno convention, and mostly the author's opinion.
-
The release workflow is opinionated, and as such runs fast and has zero configuration.
feat!:will cause a major version bump,feat:ordocs:will cause a minor version bump, andfix:,chore:and similar will cause a patch version bump. That's it!
After forking from justinawrey/shipit, these are the most notable differences from upstream:
- Require that there are no uncommitted changes before running
@hugojosefson/shipit. - Include more commit types under an "Other" section in the release notes. They are considered to be at the patch level.
- Any commit with
!is considered a breaking change.- So
feat!:will of course cause a major version bump, but if you must, you can also usefix!:to indicate that a fix was so invasive as to cause breaking changes.
- So
- Support scopes in commit messages.
- Example:
refactor(github): use latest api. - (This can be combined with the
!to indicate a breaking change, as indocs(license)!: close source. Hypothetical! Please don't follow that example.)
- Example:
- Unit tests for the more complex commit messages.
- Update dependencies.
- TODO: Bump version number in any
deno.jsonanddeno.jsonc. - Dry-run mode, doesn't make any changes, but prints new version and release
notes.
- Use
--dry-runor-nto enable, or setDRY_RUN=1in your environment.
- Use
GITHUB_TOKEN="$(gh auth token)" deno run --allow-env --allow-run --allow-net https://raw.githubusercontent.com/hugojosefson/shipit/refs/heads/main/shipit.tsIf you'd prefer to run @hugojosefson/shipit on CI, you can:
on:
push:
branches:
- main
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: denoland/setup-deno@v2
# Use latest version of @hugojosefson/shipit. You may prefer to pin a specific version.
- run: deno run --allow-net --allow-env --allow-run https://raw.githubusercontent.com/hugojosefson/shipit/refs/heads/main/shipit.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Be sure to provide GITHUB_TOKEN as an environment variable to the
@hugojosefson/shipit script, as well as set fetch-depth: 0 in the checkout
step.
@hugojosefson/shipit requires environment, network, and subprocess creation
permissions:
--allow-env: It readsGITHUB_TOKENfrom your local environment in order to authenticate with GitHub. It can also readDRY_RUNandVERBOSE.--allow-run: It needs to spawn subprocesses (git,bash) in order to gather information about your commits.--allow-net: It needs to make outbound network requests to GitHub in order to create GitHub releases.
@hugojosefson/shipit uses itself for releases. You can see the shape of the
generated releases here.