Skip to content

Commit

Permalink
Merge pull request #3 from dyoung522/develop
Browse files Browse the repository at this point in the history
Develop -> Main
  • Loading branch information
dyoung522 authored Sep 13, 2024
2 parents 8f7d13e + 7e99506 commit 2a7427a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 51 deletions.
59 changes: 29 additions & 30 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
# .github/workflows/release.yaml

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- v* # Push events to matching v*, i.e. v1.0, v20.15.10
permissions: read-all
name: Build Release
release:
types: [created]

permissions:
contents: write
packages: write

jobs:
release-darwin-amd64:
name: release darwin/amd64
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [windows, darwin, linux]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@master
- name: compile and release
uses: ngs/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: amd64
GOOS: darwin
GO111MODULE: on
EXTRA_FILES: LICENSE README.md
release-windows-amd64:
name: release windows/amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: compile and release
uses: ngs/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: amd64
GOOS: windows
GO111MODULE: on
EXTRA_FILES: LICENSE README.md
- uses: actions/checkout@v4
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: esotools
extra_files: LICENSE README.md
8 changes: 4 additions & 4 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ runtimes:
lint:
enabled:
- [email protected]
- [email protected].246
- [email protected].253
- git-diff-check
- [email protected]
- golangci-lint@1.60.3
- golangci-lint@1.61.0
- [email protected]
- [email protected].4
- [email protected].5
- [email protected]
- trufflehog@3.81.10
- trufflehog@3.82.1
- [email protected]
actions:
disabled:
Expand Down
26 changes: 14 additions & 12 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,47 @@ default: check
## Main Commands

build: fmt clean test build-osx build-linux build-win

clean: clean-bin tidy

## Supporting Commands

tidy:
go mod tidy
go mod tidy

fmt: tidy
trunk fmt
trunk fmt

fmt-all: tidy
trunk fmt --all
trunk fmt --all

check: fmt
trunk check
trunk check

check-all: fmt-all
trunk check --all
trunk check --all

test:
go test ./pkg/...
go test ./pkg/...

clean-bin:
rm -f bin/*
rm -f bin/*

update: tidy
go get -u
go get -u
trunk upgrade

## Build sub-commands

build-osx:
GOOS=darwin GOARCH=amd64 go build -o "bin/$(basename ${PWD})-osx" ./main.go
GOOS=darwin GOARCH=amd64 go build -o "bin/$(basename ${PWD})-osx" ./main.go

build-linux:
GOOS=linux GOARCH=amd64 go build -o "bin/$(basename ${PWD})-linux" ./main.go
GOOS=linux GOARCH=amd64 go build -o "bin/$(basename ${PWD})-linux" ./main.go

build-win:
GOOS=windows GOARCH=amd64 go build -o "bin/$(basename ${PWD}).exe" ./main.go
GOOS=windows GOARCH=amd64 go build -o "bin/$(basename ${PWD}).exe" ./main.go

## Git Hooks
pre-commit: clean check test
git add go.mod go.sum
git add go.mod go.sum
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down Expand Up @@ -192,8 +192,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE=
golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
Expand Down

0 comments on commit 2a7427a

Please sign in to comment.