Skip to content

Commit

Permalink
Add install instructions and releases
Browse files Browse the repository at this point in the history
  • Loading branch information
leosunmo committed Feb 16, 2024
1 parent 4cb291a commit da46bc2
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: goreleaser

on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:

permissions:
contents: write
id-token: write
packages: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21'
cache: true
- run: go mod tidy
- run: go test -v ./...
- name: Install Cosign
uses: sigstore/[email protected]
- uses: goreleaser/goreleaser-action@v4
if: success() && startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-dev"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
signs:
- cmd: cosign
signature: "${artifact}.sig"
certificate: "${artifact}.pem"
env:
- COSIGN_EXPERIMENTAL=1
args:
- sign-blob
- "-y"
- "--oidc-issuer=https://token.actions.githubusercontent.com"
- "--output-signature=${signature}"
- "--output-certificate=${certificate}"
- "${artifact}"
artifacts: all
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

Tiny command-line tool for creating JIRA tickets with a summary/title and optionally a description.

## Installation
If you have go install locally, compile and install with:
```bash
go install github.com/leosunmo/jt/cmd/jt
```
Otherwise download a release from the [releases page](https://github.com/leosunmo/jt/releases) and put it in your path.

## Usage
Create a config file under `~/.config/jt/config.yaml` with some default values. Here's an example with all supported values:
```yaml
Expand Down

0 comments on commit da46bc2

Please sign in to comment.