Skip to content

Commit 8bd7d7b

Browse files
committed
build(release): updated release config and workflow
adds docker, nix and apt/deb release fixes #2
1 parent 4e94f3a commit 8bd7d7b

File tree

3 files changed

+61
-6
lines changed

3 files changed

+61
-6
lines changed

.github/workflows/release.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
packages: write
1011

1112
jobs:
1213
release:
@@ -20,11 +21,19 @@ jobs:
2021
uses: actions/setup-go@v2
2122
with:
2223
go-version: 1.20.0
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v2
26+
- name: Log in to registry
27+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
28+
- uses: cachix/install-nix-action@v22
29+
with:
30+
nix_path: nixpkgs=channel:nixos-unstable
2331
- name: Run GoReleaser
2432
uses: goreleaser/goreleaser-action@v2
2533
with:
2634
distribution: goreleaser
2735
version: ${{ env.GITHUB_REF_NAME }}
28-
args: release --rm-dist
36+
args: release --clean
2937
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
GITHUB_TOKEN: ${{ secrets.PAT }}
39+
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}

.goreleaser.yml

+47-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
builds:
3-
- binary: mediumautopost
3+
- binary: ghs
44
goos:
55
- darwin
66
- linux
@@ -17,15 +17,58 @@ universal_binaries:
1717
- replace: true
1818

1919
brews:
20-
-
21-
name: ghs
20+
- name: ghs
2221
homepage: "https://github.com/flexwie/ghs"
23-
tap:
22+
repository:
2423
owner: flexwie
2524
name: homebrew-flexwie
2625
commit_author:
2726
name: flexwie
2827
email: ghs@felixwie.com
28+
description: "a npx-like script execution for gists"
29+
license: MIT
30+
dependencies:
31+
- gh
2932

33+
nfpms:
34+
- id: aptpackages
35+
package_name: ghs
36+
homepage: https://github.com/flexwie/ghs
37+
maintainer: Felix Wieland <ghs@felixwie.com>
38+
description: a npx-like script execution for gists
39+
license: MIT
40+
formats:
41+
- deb
42+
- rpm
43+
dependencies:
44+
- gh
45+
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
46+
47+
publishers:
48+
- name: fury.io
49+
ids:
50+
- aptpackages
51+
cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/flexwie/
52+
dir: "{{ dir .ArtifactPath }}"
53+
54+
dockers:
55+
- image_templates:
56+
- ghcr.io/flexwie/ghs:{{ .Tag }}
57+
- ghcr.io/flexwie/ghs:latest
58+
59+
nix:
60+
- name: ghs
61+
commit_author:
62+
name: Felix Wieland
63+
email: git@felixwie.com
64+
homepage: https://github.com/flexwie/ghs
65+
description: a npx-like script execution for gists
66+
license: MIT
67+
dependencies:
68+
- gh
69+
repository:
70+
owner: flexwie
71+
name: nur-packages
72+
3073
checksum:
3174
name_template: 'checksums.txt'

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM scratch
2+
ENTRYPOINT [ "/ghs" ]
3+
COPY ghs /

0 commit comments

Comments
 (0)