diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1370aa1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: goreleaser + +on: + pull_request: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 8f66aea..51b152c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ nar-serve +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..32f6952 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,28 @@ +# Documentation at http://goreleaser.com +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin +archives: + - replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/flake.lock b/flake.lock index 960113a..e5d58d5 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1595410516, - "narHash": "sha256-8lKGIGTyo1uVfdT0TXEJk9YAR/Tw08sRA/VLOm9ewco=", + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", "owner": "numtide", "repo": "flake-utils", - "rev": "8e1f14e82dcd87f484a5024a86e52399b1061416", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1596223965, - "narHash": "sha256-nlnq5zUPB8tX/0Lyw0DfQZ5J/sNJYGE67zAIayBDwg4=", + "lastModified": 1626439186, + "narHash": "sha256-1vLjuwyMacErKnYQpRjEKl42Zh6hiIbP7Xilyjvm3U0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "102fa5492c071f634b9c741e137551c2d93216e2", + "rev": "52ea0f4aff16378fa86b6583686d005617195acb", "type": "github" }, "original": { diff --git a/shell.nix b/shell.nix index 6e8360f..7418492 100644 --- a/shell.nix +++ b/shell.nix @@ -4,10 +4,11 @@ nixpkgs.mkShell { buildInputs = [ nixpkgs.go - nixpkgs.gopls - nixpkgs.gopkgs - nixpkgs.gocode nixpkgs.go-outline + nixpkgs.gocode + nixpkgs.gopkgs + nixpkgs.gopls + nixpkgs.goreleaser nixpkgs.minio nixpkgs.minio-client nixpkgs.reflex