shipit 🛶
Like semantic-release, but opinionated, fast, and built with Deno in mind.
How is this different?
Its 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 deno doc will scrape your code. This decision is less of a Deno convention, and mostly my 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:will cause a patch version bump. Thats it!
Usage
Install shipit locally:
deno install --allow-env --allow-run --allow-net https://deno.land/x/shipit/shipit.tsAnd ship it!
shipitIn order to be able to authenticate with Github, you must set an environment
variable called GITHUB_TOKEN to a
personal access token
with repo permissions.
If you’d prefer to run shipit on CI, you can:
on:
push:
branches:
- main
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: denoland/setup-deno@v1
with:
deno-version: vx.x.x
# Use latest version of shipit. You may prefer to pin a specific version.
- run: deno run --allow-net --allow-env --allow-run https://deno.land/x/shipit/shipit.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Be sure to provide GITHUB_TOKEN as an environment variable to the shipit
script, as well as set fetch-depth: 0 in the checkout step.
Granting permissions
shipit requires environment, network, and subprocess creation permissions:
--allow-env:shipitreadsGITHUB_TOKENfrom your local environment in order to authenticate with Github--allow-run:shipitneeds to spawn subprocesses (git,bash) in order to gather information about your commits--allow-net:shipitneeds to make outbound networks requests to Github in order to create Github releases
Examples
shipit uses itself for releases. You can see the shape of the generated
releases here.