Skip to content

Commit

Permalink
build(ci): cosign checksum and docker release
Browse files Browse the repository at this point in the history
  • Loading branch information
abhimanyu003 committed Aug 30, 2024
1 parent cb8727f commit 3b07391
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 115 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
with:
go-version: 1.22

- name: Install syft
uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2

- name: Set up Snapcraft
run: |
sudo apt-get update
Expand All @@ -44,12 +41,18 @@ jobs:
echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco
chmod +x /usr/local/bin/choco
- name: Install syft
uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1

- name: Install cosign
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0

- name: Login to ghcr.io registry
uses: docker/login-action@v3
with:
Expand All @@ -74,3 +77,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
COSIGN_PASSWORD: "${{ secrets.COSIGN_PASSWORD }}"
COSIGN_PRIVATE_KEY: "${{ secrets.COSIGN_PRIVATE_KEY }}"
COSIGN_PUBLIC_KEY: "${{ secrets.COSIGN_PUBLIC_KEY }}"
119 changes: 26 additions & 93 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,99 +25,6 @@ changelog:
filters:
exclude: ["^docs:", "demo", "^hugo:", "Merge pull request", "Merge branch"]

brews:
- repository:
owner: abhimanyu003
name: homebrew-sttr
name: sttr
homepage: "https://github.com/abhimanyu003/sttr"
description: "A cross-platform, cli app to perform various string operations."
license: "MIT"
skip_upload: auto
commit_author:
name: abhimanyu003
email: [email protected]
directory: Formula
install: |-
bin.install "sttr"
test: |
system "#{bin}/sttr -v"
scoops:
- repository:
owner: abhimanyu003
name: scoop-bucket
token: "{{ .Env.GITHUB_TOKEN }}"
name: sttr
homepage: "https://github.com/abhimanyu003/sttr"
description: "sttr is command line software that allows you to quickly run various transformation operations on the string."
license: "MIT"

nfpms:
- builds:
- sttr
vendor: abhimanyu003
homepage: "https://github.com/abhimanyu003/sttr/"
maintainer: "Abhimanyu Sharma <[email protected]>"
description: "A cross-platform, cli app to perform various operations on string"
license: MIT
formats:
- deb
- rpm
- termux.deb
bindir: /usr/bin

snapcrafts:
- name: sttr
publish: true
summary: A cross-platform, cli app to perform various operations on string.
description: |
sttr is command line software that allows you to quickly run various transformation operations on the string.
grade: stable
confinement: strict
license: MIT
base: core20

apps:
sttr:
plugs: ["home", "network"]

aurs:
- name: sttr-bin
homepage: "https://github.com/abhimanyu003/sttr"
description: "sttr is command line software that allows you to quickly run various transformation operations on the string."
maintainers:
- "Abhimanyu Sharma <[email protected]>"
license: "MIT"
private_key: "{{ .Env.AUR_KEY }}"
git_url: "ssh://[email protected]/sttr-bin.git"
commit_author:
name: Abhimanyu Sharma
email: [email protected]

chocolateys:
- name: sttr
title: sttr - A cross-platform, cli app to perform various operations on string.
authors: Abhimanyu Sharma
project_url: https://github.com/abhimanyu003/sttr
url_template: "https://github.com/abhimanyu003/sttr/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
icon_url: https://cdn.jsdelivr.net/gh/abhimanyu003/sttr@main/media/logo.png
copyright: 2023 Abhimanyu Sharma
license_url: https://github.com/abhimanyu003/sttr/blob/main/LICENSE
require_license_acceptance: false
project_source_url: https://github.com/abhimanyu003/sttr
docs_url: https://github.com/abhimanyu003/sttr/blob/main/README.md
bug_tracker_url: https://github.com/abhimanyu003/sttr/issues
tags: "productivity encoding terminal string decoding tui developer-tools transform cli-app encrypt encryption-decryption count-lines devutils tui-app count-words zeropad"
summary: A cross-platform, cli app to perform various operations on string.
description: |
sttr installer package.
A cross-platform, cli app to perform various operations on string.
release_notes: "https://github.com/abhimanyu003/sttr/releases/tag/v{{ .Version }}"
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
source_repo: "https://push.chocolatey.org/"
skip_publish: true

sboms:
- artifacts: archive

Expand Down Expand Up @@ -175,3 +82,29 @@ docker_manifests:
image_templates:
- docker.io/abhimanyu003/{{ .ProjectName }}:{{ .Version }}-amd64
- docker.io/abhimanyu003/{{ .ProjectName }}:{{ .Version }}-arm64

signs:
- id: checksums
cmd: cosign
stdin: "{{ .Env.COSIGN_PASSWORD }}"
output: true
artifacts: checksum
args:
- sign-blob
- --yes
- --key
- env://COSIGN_PRIVATE_KEY
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"

docker_signs:
- cmd: cosign
artifacts: all
output: true
args:
- sign
- --yes
- --key
- env://COSIGN_PRIVATE_KEY
- "${artifact}"
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,12 @@ folder
curl -sfL https://raw.githubusercontent.com/abhimanyu003/sttr/main/install.sh | sh
```

#### Webi

**macOS / Linux**

```shell
curl -sS https://webi.sh/sttr | sh
```

**Windows**

```shell
curl.exe https://webi.ms/sttr | powershell
```

See [here](https://webinstall.dev/sttr/)

#### Homebrew

If you are on macOS and using Homebrew, you can install `sttr` with the following:

```shell
brew tap abhimanyu003/sttr
brew install sttr
brew install abhimanyu003/sttr/sttr
```

#### Snap
Expand All @@ -83,11 +66,27 @@ yay -S sttr-bin

#### Scoop

```
```shell
scoop bucket add sttr https://github.com/abhimanyu003/scoop-bucket.git
scoop install sttr
```

#### Webi

**macOS / Linux**

```shell
curl -sS https://webi.sh/sttr | sh
```

**Windows**

```shell
curl.exe https://webi.ms/sttr | powershell
```

See [here](https://webinstall.dev/sttr/)

#### Go

```shell
Expand Down

0 comments on commit 3b07391

Please sign in to comment.