Skip to content

Commit 369a220

Browse files
committed
Update github action (goreleaser)
1 parent f8bf2ad commit 369a220

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

.github/workflows/release.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- uses: cachix/install-nix-action@v27
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
- uses: cachix/cachix-action@v15
23+
with:
24+
name: mangosql
25+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
26+
- name: Install devenv.sh
27+
run: nix profile install nixpkgs#devenv
28+
- name: Build the devenv shell and run any pre-commit hooks
29+
run: devenv test
30+
- name: Run GoReleaser
31+
uses: goreleaser/goreleaser-action@v6
32+
with:
33+
distribution: goreleaser
34+
version: '~> v2'
35+
args: release --clean
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ before:
1414
- go mod tidy
1515

1616
builds:
17-
- main: cmd/mangosql
17+
- main: cmd/mangosql/mangosql.go
1818
env:
1919
- CGO_ENABLED=0
2020
goos:
2121
- linux
2222
- windows
2323
- darwin
24+
goarch:
25+
- amd64
26+
- arm64
2427

2528
archives:
2629
- format: tar.gz

0 commit comments

Comments
 (0)