From 23bdcb6ba4aaae2ea7dee91709666a19dc446568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Rainone?= <476650+arl@users.noreply.github.com> Date: Sat, 11 Feb 2023 00:38:53 +0100 Subject: [PATCH] Issue 78/homebrew (#79) * .github: rename workflows to ci, cd and release * .goreleaser: fix deprecation notices * Goreleaser publishes tap to homebrew-arl * .github: bump github-actions and go version to 1.20.x --- .github/workflows/{goreleaser.yml => cd.yml} | 10 ++++---- .github/workflows/{tests.yml => ci.yml} | 8 +++--- .goreleaser.yml | 26 +++++++++++++++++--- 3 files changed, 31 insertions(+), 13 deletions(-) rename .github/workflows/{goreleaser.yml => cd.yml} (69%) rename .github/workflows/{tests.yml => ci.yml} (62%) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/cd.yml similarity index 69% rename from .github/workflows/goreleaser.yml rename to .github/workflows/cd.yml index b985344..2f9b20a 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: goreleaser +name: Continuous Deployment on: push: @@ -13,13 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: "1.17.x" + go-version: "1.20.x" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -27,4 +27,4 @@ jobs: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/ci.yml similarity index 62% rename from .github/workflows/tests.yml rename to .github/workflows/ci.yml index 7409e32..4e2d0c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ on: [push, pull_request] -name: Tests +name: Continuous Integration jobs: test: strategy: @@ -7,9 +7,9 @@ jobs: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 with: - go-version: "1.17.x" + go-version: "1.20.x" - name: Tests run: go test -race ./... diff --git a/.goreleaser.yml b/.goreleaser.yml index 90279e2..fefdfaa 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -10,16 +10,17 @@ builds: goarch: - amd64 - arm64 - - 386 + - "386" ignore: - goos: darwin - goarch: 386 + goarch: "386" archives: - - replacements: - darwin: macOS + - name_template: >- + {{ .ProjectName }}_{{- .Tag }}_{{- if eq .Os "darwin" }}macOS{{- else }}{{ .Os }}{{ end }}_{{ .Arch }} files: - LICENSE - README.md + rlcp: true checksum: name_template: "checksums.txt" snapshot: @@ -30,3 +31,20 @@ changelog: exclude: - "^docs:" - "^test:" + +brews: + - name: gitmux + homepage: "https://github.com/arl/gitmux" + description: "Git in your tmux status bar." + license: "MIT" + url_template: "https://github.com/arl/gitmux/releases/download/{{ .Tag }}/{{ .ArtifactName }}" + commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" + folder: Formula + skip_upload: true + tap: + owner: arl + name: homebrew-arl + branch: main + commit_author: + name: goreleaser-bot + email: bot@goreleaser.com