diff --git a/.github/workflows/release-go.yaml b/.github/workflows/release-go.yaml new file mode 100644 index 0000000000..aa63988c22 --- /dev/null +++ b/.github/workflows/release-go.yaml @@ -0,0 +1,40 @@ +name: goreleaser + +on: + push: + # run only against tags + tags: + - '*' + +permissions: + contents: write + # packages: write + # issues: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Fetch all tags + run: git fetch --force --tags + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.18 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index adbd0ac955..6179df72b4 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ localtests *.iml .teamcity/target .vscode + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000000..91c39d2933 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,31 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy +builds: + - + main: ./cmd/dlv + binary: dlv + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + goarch: + - amd64 + - arm64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +archives: + - id: github + format: binary +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'