Skip to content

Commit

Permalink
docs: add example CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
justinawrey committed Oct 7, 2022
1 parent b3caf31 commit b1efb0f
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,34 @@ shipit
In order to be able to authenticate with Github, you must set an environment
variable called `GITHUB_TOKEN` to a
[personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
with `repo` permissions. This must also be done when running in a CI
environment.
with `repo` permissions.

If you'd prefer to run `shipit` on CI, you can:

```yaml
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

- 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

Expand Down

0 comments on commit b1efb0f

Please sign in to comment.