diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..78d70f6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: release +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Unshallow + run: git fetch --prune --unshallow + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Login docker.io + run: docker login -u nakabonne -p ${{ secrets.DOCKER_PASSWORD }} + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_WITH_REPO_PERM }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..507a8f6 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,48 @@ +before: + hooks: + - go mod tidy +builds: +- main: . + binary: ali + goos: + - freebsd + - darwin + - linux + - windows + goarch: + - amd64 + - arm + - arm64 + - 386 + - ppc64le + - s390x + - mips64 + - mips64le + goarm: + - 6 + - 7 + env: + - CGO_ENABLED=0 + ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} + +archives: +- replacements: + 386: 32-bit + +checksum: + name_template: 'checksums.txt' + +snapshot: + name_template: "{{ .Tag }}-next" + +changelog: + filters: + exclude: + - '^test:' + +brews: + - github: + owner: nakabonne + name: homebrew-ali + homepage: 'https://github.com/nakabonne/ali' + description: 'Generate HTTP load and plot the results in real-time'