Skip to content

Commit

Permalink
cd(cli): Release the CLI upon new tag
Browse files Browse the repository at this point in the history
  • Loading branch information
akash1810 committed Dec 13, 2023
1 parent 54d8357 commit d4e9805
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release CLI

on:
push:
tags:
- cli-v*

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write
packages: write

steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: lint + compile
working-directory: cli
run: |
deno fmt --check
deno task compile
- name: release
working-directory: cli/dist
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sha256sum devx-logs > checksum.txt
gh release create ${{ github.ref }} * --generate-notes
22 changes: 22 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,25 @@ See all options via the `--help` flag:
```bash
devx-logs --help
```

## Releasing

Releasing is semi-automated. To release a new version, create a new tag with the
`cli-v` prefix:

```bash
git tag cli-v0.0.1
```

And then push the tag:

```bash
git push --tags
```

This will trigger [a GitHub Action](../.github/workflows/release-cli.yml),
publishing a new version to GitHub releases.

Once a new release is available, update the
[Homebrew formula](https://github.com/guardian/homebrew-devtools/blob/main/Formula/devx-logs.rb)
to point to the new version.

0 comments on commit d4e9805

Please sign in to comment.