diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28db573..5e2783d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,9 @@ on: tags: - "*" +env: + REGISTRY: ghcr.io + jobs: goreleaser: runs-on: ubuntu-latest @@ -16,17 +19,13 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + go-version: 1.17 + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GH_GORELEASER_TOKEN }} - - name: Install Snapcraft and Log In - uses: samuelmeuli/action-snapcraft@v1 - with: - snapcraft_token: ${{ secrets.SNAPCRAFT_TOKEN }} + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -34,4 +33,4 @@ jobs: args: release --rm-dist env: DOCKER_CLI_EXPERIMENTAL: enabled - GITHUB_TOKEN: ${{ secrets.GH_GORELEASER_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 9005d09..29e4b4b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -42,21 +42,14 @@ archives: - LICENSE - completions/ -snapcrafts: - - name_template: "{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" - summary: Command-line DNS client. - description: | - doggo is a command-line DNS client written in Go. It supports protocols like DoH, DoT and output formats like JSON. - grade: stable - confinement: strict - publish: true - dockers: - image_templates: - "ghcr.io/mr-karan/doggo:{{ .Tag }}" - "ghcr.io/mr-karan/doggo:latest" - binaries: - - doggo + id: doggo + # IDs to filter the binaries/packages. + ids: + - cli dockerfile: Dockerfile-cli build_flag_templates: - "--build-arg" @@ -64,8 +57,10 @@ dockers: - image_templates: - "ghcr.io/mr-karan/doggo:{{ .Tag }}-arm64v8" - "ghcr.io/mr-karan/doggo:latest-arm64v8" - binaries: - - doggo + id: doggo-arm + # IDs to filter the binaries/packages. + ids: + - cli goarch: arm64 dockerfile: Dockerfile-cli build_flag_templates: @@ -73,10 +68,11 @@ dockers: - "ARCH=arm64v8" - image_templates: - - "ghcr.io/mr-karan/doggo-api:{{ .Tag }}" - - "ghcr.io/mr-karan/doggo-api:latest" - binaries: - - doggo-api.bin + - "ghcr.io/mr-karan/doggo:api-{{ .Tag }}" + - "ghcr.io/mr-karan/doggo:api:latest" + id: doggo-api + ids: + - api dockerfile: Dockerfile-api build_flag_templates: - "--build-arg" @@ -86,8 +82,9 @@ dockers: - image_templates: - "ghcr.io/mr-karan/doggo-api:{{ .Tag }}-arm64v8" - "ghcr.io/mr-karan/doggo-api:latest-arm64v8" - binaries: - - doggo-api.bin + id: doggo-api-arm + ids: + - api goarch: arm64 dockerfile: Dockerfile-api build_flag_templates: diff --git a/go.mod b/go.mod index 442da1f..101eeb9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/mr-karan/doggo -go 1.16 +go 1.17 require ( github.com/ameshkov/dnscrypt/v2 v2.2.1 @@ -9,10 +9,33 @@ require ( github.com/go-chi/chi v1.5.3 github.com/knadh/koanf v0.14.0 github.com/lucas-clemente/quic-go v0.24.0 - github.com/mattn/go-runewidth v0.0.9 // indirect github.com/miekg/dns v1.1.40 github.com/olekukonko/tablewriter v0.0.4 github.com/sirupsen/logrus v1.7.0 github.com/spf13/pflag v1.0.5 golang.org/x/sys v0.0.0-20210510120138-977fb7262007 ) + +require ( + github.com/AdguardTeam/golibs v0.4.2 // indirect + github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect + github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 // indirect + github.com/cheekybits/genny v1.0.0 // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect + github.com/marten-seemann/qtls-go1-16 v0.1.4 // indirect + github.com/marten-seemann/qtls-go1-17 v0.1.0 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mitchellh/mapstructure v1.2.2 // indirect + github.com/nxadm/tail v1.4.8 // indirect + github.com/onsi/ginkgo v1.16.4 // indirect + github.com/pelletier/go-toml v1.7.0 // indirect + golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect + golang.org/x/mod v0.4.2 // indirect + golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect + golang.org/x/tools v0.1.1 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect +)